Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
fix(Stack): Fix StackItem not receiving "hidden" props
Browse files Browse the repository at this point in the history
  • Loading branch information
diondiondion committed Mar 8, 2021
1 parent c3400cb commit 8c6c92c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Stack/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ import {StackWrapper, StackItem} from 'base5-ui/Stack';
```

All `Stack` props are now passed to the `StackWrapper` instead.
Instead of using the `Hidden` component to responsively hide items, you can pass the `hideBelow` prop to items.
Instead of using the `Hidden` component to responsively hide items, you can pass the `hiddenBelow` or `hiddenAbove` props to items.
`StackItem` rejects all other custom props by default, but you can allow them to be passed through by attaching the `allowUnknownProps` prop.

<Playground>
<StackWrapper as="list" spacing={[0, 's', 'xl']} breakpoints={['m', 'l']}>
<StackItem>Development</StackItem>
<StackItem>Marketing</StackItem>
<StackItem hideBelow="xs">Sales</StackItem>
<StackItem hiddenBelow="xs">Sales</StackItem>
<StackItem>Design</StackItem>
</StackWrapper>
</Playground>
Expand Down
2 changes: 2 additions & 0 deletions src/Stack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ const StackItem = forwardRef(function StackItem(
ref={ref}
as={as}
pt={spacing}
below={hiddenBelow}
above={hiddenAbove}
breakpoints={breakpoints}
>
{children}
Expand Down

0 comments on commit 8c6c92c

Please sign in to comment.