-
Notifications
You must be signed in to change notification settings - Fork 28
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
3 changed files
with
54 additions
and
8 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,40 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import { TextField } from "seed-design/ui/text-field"; | ||
|
||
import { textFieldVariantMap } from "@seed-design/recipe/textField"; | ||
import { VariantTable } from "./components/variant-table"; | ||
import { SeedThemeDecorator } from "./components/decorator"; | ||
import { IconPaperplaneLine } from "@daangn/react-monochrome-icon"; | ||
|
||
const meta = { | ||
component: TextField, | ||
decorators: [SeedThemeDecorator], | ||
} satisfies Meta<typeof TextField>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
const CommonStoryTemplate: Story = { | ||
args: { | ||
label: "Label", | ||
description: | ||
"Sint pariatur labore et elit dolore sunt velit incididunt nisi laboris cillum et dolore ad ullamco.", | ||
placeholder: "Placeholder", | ||
prefix: <IconPaperplaneLine />, | ||
suffix: "Suffix", | ||
maxGraphemeCount: 10, | ||
}, | ||
render: (args) => ( | ||
<VariantTable Component={meta.component} variantMap={textFieldVariantMap} {...args} /> | ||
), | ||
}; | ||
|
||
export const LightTheme = CommonStoryTemplate; | ||
|
||
export const DarkTheme = CommonStoryTemplate; | ||
|
||
export const FontScalingExtraSmall = CommonStoryTemplate; | ||
|
||
export const FontScalingExtraExtraExtraLarge = CommonStoryTemplate; |
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