-
Notifications
You must be signed in to change notification settings - Fork 462
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
Showing
9 changed files
with
314 additions
and
36,847 deletions.
There are no files selected for viewing
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
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,58 @@ | ||
import type { Meta, StoryObj } from "@storybook/react" | ||
import { Badge, BadgeProps } from "./Badge" | ||
|
||
const meta: Meta<typeof Badge> = { | ||
title: "Design system/Badge", | ||
component: Badge, | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof Badge> | ||
|
||
export const Default: Story = { | ||
args: { | ||
children: "Default", | ||
variant: "default", | ||
size: "md", | ||
}, | ||
argTypes: { | ||
variant: { | ||
control: { | ||
disable: true, | ||
}, | ||
}, | ||
size: { | ||
type: "string", | ||
control: "radio", | ||
options: ["sm", "md", "lg"] satisfies BadgeProps["size"][], | ||
}, | ||
}, | ||
} | ||
|
||
export const Secondary: Story = { | ||
args: { | ||
...Default.args, | ||
children: "Secondary", | ||
variant: "secondary", | ||
}, | ||
argTypes: Default.argTypes, | ||
} | ||
|
||
export const Destructive: Story = { | ||
args: { | ||
...Default.args, | ||
children: "Destructive", | ||
variant: "destructive", | ||
}, | ||
argTypes: Default.argTypes, | ||
} | ||
|
||
export const Outline: Story = { | ||
args: { | ||
...Default.args, | ||
children: "Outline", | ||
variant: "outline", | ||
}, | ||
argTypes: Default.argTypes, | ||
} |
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,33 @@ | ||
import type { Meta, StoryObj } from "@storybook/react" | ||
import { | ||
DropdownMenu, | ||
DropdownMenuContent, | ||
DropdownMenuItem, | ||
DropdownMenuLabel, | ||
DropdownMenuSeparator, | ||
DropdownMenuTrigger, | ||
} from "./DropdownMenu" | ||
|
||
const DropdownMenuExample = () => ( | ||
<DropdownMenu> | ||
<DropdownMenuTrigger>Open</DropdownMenuTrigger> | ||
<DropdownMenuContent> | ||
<DropdownMenuLabel>Menu title</DropdownMenuLabel> | ||
<DropdownMenuSeparator /> | ||
<DropdownMenuItem>Menu item #1</DropdownMenuItem> | ||
<DropdownMenuItem>Another item</DropdownMenuItem> | ||
<DropdownMenuItem>This is the third one</DropdownMenuItem> | ||
</DropdownMenuContent> | ||
</DropdownMenu> | ||
) | ||
|
||
const meta: Meta<typeof DropdownMenuExample> = { | ||
title: "Design system/DropdownMenu", | ||
component: DropdownMenuExample, | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof DropdownMenuExample> | ||
|
||
export const Default: Story = {} |
Oops, something went wrong.