-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c03c92
commit 5bd626d
Showing
5 changed files
with
82 additions
and
12 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
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
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,57 @@ | ||
import { IconButton, Stack, Text } from '@chakra-ui/react' | ||
import type { Meta } from '@storybook/react' | ||
import { FiCircle } from 'react-icons/fi' | ||
|
||
const meta: Meta = { | ||
title: 'Components / Icon Button', | ||
} | ||
|
||
export default meta | ||
|
||
export const WithSizes = () => { | ||
const sizes = ['2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl'] | ||
return ( | ||
<Stack spacing="8" align="start"> | ||
{sizes.map((size) => ( | ||
<Stack key={size}> | ||
<Text textStyle="xs" color="fg.muted"> | ||
{size} | ||
</Text> | ||
<IconButton variant="primary" size={size} icon={<FiCircle />} aria-label="icon button" /> | ||
</Stack> | ||
))} | ||
</Stack> | ||
) | ||
} | ||
|
||
export const WithVariants = () => { | ||
const variants = [ | ||
{ variant: 'primary', colorScheme: 'brand' }, | ||
{ variant: 'secondary', colorScheme: 'gray' }, | ||
{ variant: 'tertiary', colorScheme: 'gray' }, | ||
] | ||
return ( | ||
<Stack spacing="8" align="start"> | ||
{variants.map(({ variant, colorScheme }) => ( | ||
<Stack key={variant} spacing="3"> | ||
<Text textStyle="xs" color="fg.muted"> | ||
{variant} | ||
</Text> | ||
<IconButton | ||
variant={variant} | ||
colorScheme={colorScheme} | ||
icon={<FiCircle />} | ||
aria-label="Circle" | ||
/> | ||
<IconButton | ||
variant={variant} | ||
colorScheme={colorScheme} | ||
icon={<FiCircle />} | ||
aria-label="Circle" | ||
isDisabled | ||
/> | ||
</Stack> | ||
))} | ||
</Stack> | ||
) | ||
} |