-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Card): auto expand height in a row context
- Loading branch information
1 parent
9b81577
commit f8532ce
Showing
7 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@ultraviolet/plus": patch | ||
"@ultraviolet/ui": patch | ||
--- | ||
|
||
Auto increase the height of `<Card />` in a row context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/ui/src/components/Card/__stories__/Layout.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { StoryFn } from '@storybook/react' | ||
import { Row } from '../../Row' | ||
import { Card } from '../index' | ||
|
||
export const Layout: StoryFn = args => ( | ||
<Row templateColumns="repeat(2, 1fr)" gap={2}> | ||
<Card {...args} header="Lorem Ipsum"> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit Pellentesque sit | ||
</Card> | ||
<Card header="Lorem Ipsum"> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit Pellentesque sit | ||
amet purus nec nunc fermentum ultricies Donec auctor, nunc nec ultricies | ||
ultricies, nunc nunc | ||
</Card> | ||
</Row> | ||
) | ||
|
||
Layout.parameters = { | ||
docs: { | ||
description: { | ||
story: | ||
'You can set two cards in a row with `Row` component. The card will automatically adjust its width and height to fit the row.', | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters