diff --git a/packages/eds-core-react/.storybook/components/Stack.tsx b/packages/eds-core-react/.storybook/components/Stack.tsx index 5c000e8a08..fef29478a6 100644 --- a/packages/eds-core-react/.storybook/components/Stack.tsx +++ b/packages/eds-core-react/.storybook/components/Stack.tsx @@ -3,16 +3,30 @@ import { styled, StyledObject } from 'styled-components' type StackProps = { direction?: StyledObject['flexDirection'] align?: StyledObject['alignItems'] + children: React.ReactNode +} & React.HTMLAttributes + +type StyledStackProps = { + $direction?: StyledObject['flexDirection'] + $align?: StyledObject['alignItems'] } -export const Stack = styled.div` +const StyledStack = styled.div` display: flex; flex-direction: column; justify-content: center; - align-items: ${({ align }) => align || 'center'}; + align-items: ${({ $align }) => $align || 'center'}; gap: 1rem; flex-wrap: wrap; @media screen and (min-width: 600px) { - flex-direction: ${({ direction }) => direction || 'row'}; + flex-direction: ${({ $direction }) => $direction || 'row'}; } ` + +export const Stack = ({ children, direction, align, ...rest }: StackProps) => { + return ( + + {children} + + ) +}