-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(external-link): spread props correctly
- Loading branch information
1 parent
dbc0d04
commit 163e51b
Showing
2 changed files
with
35 additions
and
3 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,32 @@ | ||
import { Flex } from '@chakra-ui/layout'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import type { ExternalLinkProps } from './external-link'; | ||
import { ExternalLink } from './external-link'; | ||
|
||
const meta: Meta<typeof ExternalLink> = { | ||
title: 'Primitives/ExternalLink', | ||
tags: ['autodocs'], | ||
component: ExternalLink, | ||
args: { | ||
label: 'External Link', | ||
href: 'https://example.com', | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof ExternalLink>; | ||
|
||
const Component = (props: ExternalLinkProps) => { | ||
return ( | ||
<Flex flexDir="column"> | ||
<ExternalLink fontSize="sm" {...props} /> | ||
<ExternalLink fontSize="sm" fontWeight="semibold" {...props} /> | ||
<ExternalLink {...props} /> | ||
</Flex> | ||
); | ||
}; | ||
|
||
export const Default: Story = { | ||
render: Component, | ||
}; |
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