-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor : 디자인 시스템에 정의된 타이포그래피 적용 * Refactor: 디자인 시스템내 정의된 variant 로 변경 * New : Typography 문서화 * Refactor : Storybook CD 개선
- Loading branch information
1 parent
ca51709
commit ee87fb6
Showing
5 changed files
with
162 additions
and
4 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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
Dockerfile | ||
.dockerignore | ||
storybook.Dockerfile | ||
storybook-static | ||
node_modules | ||
npm-debug.log | ||
README.md | ||
|
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,89 @@ | ||
import { Typography } from "@mui/material"; | ||
import { Meta, StoryObj } from "@storybook/react"; | ||
const meta = { | ||
title: "Design system/Typography", | ||
component: Typography, | ||
tags: ["autodocs"], | ||
argTypes: { | ||
variant: { | ||
options: [ | ||
"h1", | ||
"h2", | ||
"subtitle1", | ||
"subtitle2", | ||
"body", | ||
"button", | ||
"label", | ||
"caption", | ||
], | ||
default: "body", | ||
control: { type: "select" }, | ||
}, | ||
}, | ||
decorators: [ | ||
(Story, ctx) => { | ||
return ( | ||
<div style={{ display: "flex", flexDirection: "column" }}> | ||
<Typography variant={ctx.args.variant} sx={{ fontWeight: "bold" }}> | ||
{ctx.args.children} | ||
</Typography> | ||
<Story /> | ||
</div> | ||
); | ||
}, | ||
], | ||
} satisfies Meta<typeof Typography>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Heading1: Story = { | ||
args: { | ||
variant: "h1", | ||
children: "오늘은 이거다 주酒, D-SHOT, DA(alcohol)ily", | ||
}, | ||
}; | ||
|
||
export const Heading2: Story = { | ||
args: { | ||
...Heading1.args, | ||
variant: "h2", | ||
}, | ||
}; | ||
|
||
export const Subtitle1: Story = { | ||
args: { | ||
...Heading1.args, | ||
variant: "subtitle1", | ||
}, | ||
}; | ||
export const Subtitle2: Story = { | ||
args: { | ||
...Heading1.args, | ||
variant: "subtitle1", | ||
}, | ||
}; | ||
export const Body1: Story = { | ||
args: { | ||
...Heading1.args, | ||
variant: "body1", | ||
}, | ||
}; | ||
export const Button: Story = { | ||
args: { | ||
...Heading1.args, | ||
variant: "button", | ||
}, | ||
}; | ||
export const Label: Story = { | ||
args: { | ||
...Heading1.args, | ||
variant: "label", | ||
}, | ||
}; | ||
export const Caption: Story = { | ||
args: { | ||
...Heading1.args, | ||
variant: "caption", | ||
}, | ||
}; |