-
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.
feat: 텍스트 컴포넌트 as 추가, typo 관련 panda 설정 panda-config 로 이동
- Loading branch information
Showing
7 changed files
with
809 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,8 @@ | ||
import { defineConfig } from "@pandacss/dev"; | ||
import commonConfig from "@wow-class/panda-config/common-config"; | ||
|
||
import { typography } from "wowds-tokens"; | ||
|
||
export default defineConfig({ | ||
...commonConfig, | ||
staticCss: { | ||
css: [ | ||
{ | ||
properties: { | ||
textStyle: Object.keys(typography), | ||
}, | ||
}, | ||
], | ||
}, | ||
dependencies: ["./src/components/**"], | ||
include: ["./src/**/*.{ts,tsx,js,jsx}"], | ||
}); |
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,61 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import Text from "."; | ||
|
||
const meta: Meta<typeof Text> = { | ||
title: "UI/Text", | ||
component: Text, | ||
tags: ["autodocs"], | ||
parameters: { | ||
componentSubtitle: "Text 컴포넌트", | ||
}, | ||
argTypes: { | ||
as: { | ||
control: { type: "select" }, | ||
options: ["p", "h1", "h2", "h3", "span", "div"], | ||
description: "HTML 태그 이름", | ||
}, | ||
typo: { | ||
control: { type: "text" }, | ||
description: "텍스트 타이포", | ||
}, | ||
color: { | ||
control: { type: "color" }, | ||
description: "텍스트 색상", | ||
}, | ||
children: { | ||
control: { type: "text" }, | ||
description: "텍스트 내용", | ||
}, | ||
style: { | ||
control: { type: "object" }, | ||
description: "커스텀 스타일 객체", | ||
}, | ||
className: { | ||
control: { type: "text" }, | ||
description: "커스텀 클래스 이름", | ||
}, | ||
}, | ||
} satisfies Meta<typeof Text>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
children: "예시", | ||
as: "p", | ||
typo: "body1", | ||
color: "textBlack", | ||
}, | ||
}; | ||
|
||
export const AsDiv: Story = { | ||
args: { | ||
children: "예시", | ||
as: "div", | ||
typo: "h1", | ||
color: "primary", | ||
}, | ||
}; |
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.