Skip to content

Commit

Permalink
Merge pull request #6375 from Sage/FE-5882-loaderbar-height-fix
Browse files Browse the repository at this point in the history
fix(loaderbar): loaderBar height fix
  • Loading branch information
nuria1110 authored Nov 3, 2023
2 parents 8fcc359 + dbb52df commit f4e9275
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
21 changes: 20 additions & 1 deletion src/components/loader-bar/loader-bar-test.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React from "react";
import { ComponentStory } from "@storybook/react";
import LoaderBar, { LoaderBarProps } from ".";
import { LOADER_BAR_SIZES } from "./loader-bar.config";
import Box from "../box";
import Typography from "../typography";

export default {
title: "Loader Bar/Test",
includeStories: ["DefaultStory"],
includeStories: ["DefaultStory", "LoaderBarWithMinHeight"],
parameters: {
info: { disable: true },
chromatic: {
Expand All @@ -30,3 +33,19 @@ DefaultStory.storyName = "default";
export const LoaderBarComponentTest = (props: LoaderBarProps) => {
return <LoaderBar mt={2} size="medium" {...props} />;
};

export const LoaderBarWithMinHeight: ComponentStory<typeof LoaderBar> = () => {
return (
<Box p={3}>
<Box backgroundColor="#e0e0e0" minHeight="50px">
<Typography>Small bar</Typography>
</Box>
<LoaderBar m={0} size="small" />
</Box>
);
};

LoaderBarWithMinHeight.parameters = {
chromatic: { disableSnapshot: false },
controls: { disable: true },
};
1 change: 0 additions & 1 deletion src/components/loader-bar/loader-bar.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const innerBarAnimation = keyframes`

const StyledLoaderBar = styled.div<StyledLoaderBarProps>`
${({ size }) => css`
display: inline-block;
border-radius: var(--borderRadius400);
height: ${getHeight(size)};
width: 100%;
Expand Down

0 comments on commit f4e9275

Please sign in to comment.