-
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.
refactor: Convert UI files to TS (#3475)
- Loading branch information
1 parent
f192e1f
commit c6a90fc
Showing
30 changed files
with
374 additions
and
309 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
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 was deleted.
Oops, something went wrong.
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,117 @@ | ||
import { type Meta, type StoryObj } from '@storybook/react' | ||
|
||
import Button from './Button' | ||
|
||
import Icon from '../Icon' | ||
|
||
const meta: Meta<typeof Button> = { | ||
title: 'Components/Button', | ||
component: Button, | ||
argTypes: { onClick: { action: 'clicked' } }, | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof Button> | ||
|
||
export const NormalButton: Story = { | ||
args: { | ||
children: 'Normal button', | ||
variant: 'default', | ||
disabled: false, | ||
}, | ||
render: (args) => <Button {...args} />, | ||
} | ||
|
||
export const PrimaryButton: Story = { | ||
args: { | ||
children: 'Primary button', | ||
variant: 'primary', | ||
disabled: false, | ||
}, | ||
render: (args) => <Button {...args} />, | ||
} | ||
|
||
export const DangerButton: Story = { | ||
args: { | ||
children: 'Danger button', | ||
variant: 'danger', | ||
disabled: false, | ||
}, | ||
render: (args) => <Button {...args} />, | ||
} | ||
|
||
export const DisabledButton: Story = { | ||
args: { | ||
children: 'Disabled button', | ||
disabled: true, | ||
}, | ||
render: (args) => <Button {...args} />, | ||
} | ||
|
||
export const SecondaryButton: Story = { | ||
args: { | ||
children: 'Secondary button', | ||
variant: 'secondary', | ||
disabled: false, | ||
}, | ||
render: (args) => <Button {...args} />, | ||
} | ||
|
||
export const PlainButton: Story = { | ||
args: { | ||
children: 'Plain button', | ||
variant: 'plain', | ||
}, | ||
render: (args) => <Button {...args} />, | ||
} | ||
|
||
export const ListboxButton: Story = { | ||
args: { | ||
children: 'Listbox button', | ||
variant: 'listbox', | ||
}, | ||
render: (args) => <Button {...args} />, | ||
} | ||
|
||
export const GitHubButton: Story = { | ||
args: { | ||
children: 'GitHub Button', | ||
variant: 'github', | ||
}, | ||
render: (args) => <Button {...args} />, | ||
} | ||
|
||
export const GitLabButton: Story = { | ||
args: { | ||
children: 'GitLab Button', | ||
variant: 'gitlab', | ||
}, | ||
render: (args) => <Button {...args} />, | ||
} | ||
|
||
export const BitbucketButton: Story = { | ||
args: { | ||
children: 'Bitbucket Button', | ||
variant: 'bitbucket', | ||
}, | ||
render: (args) => <Button {...args} />, | ||
} | ||
export const OktaButton: Story = { | ||
args: { | ||
children: 'Okta Button', | ||
variant: 'okta', | ||
}, | ||
render: (args) => <Button {...args} />, | ||
} | ||
|
||
export const MixedButton: Story = { | ||
args: { | ||
children: ( | ||
<> | ||
Mixed content <Icon name="search" size="sm" /> | ||
</> | ||
), | ||
}, | ||
render: (args) => <Button {...args} />, | ||
} |
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
Oops, something went wrong.