@liner-fe/prism 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/lib/components/Button/index.d.ts +1 -1
  2. package/lib/components/Button/index.stories.d.ts +25 -0
  3. package/lib/design-token/border-radius/index.d.ts +1 -0
  4. package/lib/design-token/color/index.d.ts +5 -0
  5. package/lib/design-token/opacity/index.d.ts +1 -0
  6. package/lib/design-token/size/index.d.ts +1 -0
  7. package/lib/design-token/typography/index.d.ts +1 -0
  8. package/lib/index.cjs +90 -0
  9. package/lib/index.cjs.map +7 -0
  10. package/lib/index.css +112 -1
  11. package/lib/index.css.map +7 -0
  12. package/lib/index.mjs +69 -0
  13. package/lib/index.mjs.map +7 -0
  14. package/package.json +19 -13
  15. package/src/Configure.mdx +32 -0
  16. package/src/assets/design-token-cover.png +0 -0
  17. package/src/components/Button/index.stories.tsx +152 -0
  18. package/src/components/Button/index.tsx +93 -0
  19. package/src/components/Button/style.module.scss +134 -0
  20. package/src/design-token/border-radius/index.mdx +8 -0
  21. package/src/design-token/border-radius/index.stories.ts +17 -0
  22. package/src/design-token/border-radius/index.tsx +29 -0
  23. package/src/design-token/color/index.mdx +38 -0
  24. package/src/design-token/color/index.stories.ts +28 -0
  25. package/src/design-token/color/index.tsx +28 -0
  26. package/src/design-token/opacity/index.mdx +8 -0
  27. package/src/design-token/opacity/index.stories.ts +17 -0
  28. package/src/design-token/opacity/index.tsx +1 -0
  29. package/src/design-token/size/index.mdx +8 -0
  30. package/src/design-token/size/index.stories.ts +17 -0
  31. package/src/design-token/size/index.tsx +23 -0
  32. package/src/design-token/typography/index.mdx +8 -0
  33. package/src/design-token/typography/index.stories.ts +17 -0
  34. package/src/design-token/typography/index.tsx +13 -0
  35. package/src/index.ts +2 -0
  36. package/src/utils/object.ts +3 -0
  37. package/lib/components/Button/index.jsx +0 -41
  38. package/lib/index.js +0 -1
  39. package/lib/tsconfig.production.tsbuildinfo +0 -1
  40. package/lib/utils/object.js +0 -7
@@ -0,0 +1,152 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Button, ButtonProps } from '.';
3
+
4
+ const meta: Meta<typeof Button> = {
5
+ title: 'Components/Button',
6
+ component: Button,
7
+ args: {
8
+ children: 'Button',
9
+ level: 'primary',
10
+ align: 'center',
11
+ size: 'cta',
12
+ disabled: false,
13
+ },
14
+ argTypes: {
15
+ children: {
16
+ control: {
17
+ type: 'text',
18
+ },
19
+ description: '버튼 안에 표시할 컨텐츠',
20
+ },
21
+ level: {
22
+ options: ['primary', 'secondary', 'tertiary', 'quaternary', 'quinary', 'negative', 'inverse'],
23
+ control: {
24
+ type: 'select',
25
+ },
26
+ description: '버튼의 레벨 타입을 설정합니다.',
27
+ },
28
+ align: {
29
+ options: ['center', 'spaceBetween'],
30
+ control: {
31
+ type: 'inline-radio',
32
+ },
33
+ description: '버튼 안의 컨텐츠의 정렬 방식을 설정합니다.',
34
+ },
35
+ size: {
36
+ options: ['cta', 'l', 'm', 's'],
37
+ control: {
38
+ type: 'inline-radio',
39
+ },
40
+ description: '버튼의 크기를 설정합니다.',
41
+ },
42
+ disabled: {
43
+ control: {
44
+ type: 'boolean',
45
+ default: false,
46
+ },
47
+ description: '버튼의 비활성화 여부를 설정합니다.',
48
+ },
49
+ },
50
+ decorators: [
51
+ Story => (
52
+ <article
53
+ style={{
54
+ display: 'flex',
55
+ gap: '10px',
56
+ flexWrap: 'wrap',
57
+ alignItems: 'flex-end',
58
+ }}
59
+ >
60
+ <Story />
61
+ </article>
62
+ ),
63
+ ],
64
+ tags: ['autodocs'],
65
+ };
66
+ export default meta;
67
+
68
+ type Story = StoryObj<typeof meta>;
69
+
70
+ /**
71
+ * 기본 버튼
72
+ */
73
+ export const Default: Story = {
74
+ args: {
75
+ level: 'primary',
76
+ align: 'center',
77
+ size: 'cta',
78
+ disabled: false,
79
+ },
80
+
81
+ render: args => <Button {...args}>{args.children}</Button>,
82
+ };
83
+
84
+ const LEVELS: ButtonProps['level'][] = [
85
+ 'primary',
86
+ 'secondary',
87
+ 'tertiary',
88
+ 'quaternary',
89
+ 'quinary',
90
+ 'negative',
91
+ 'inverse',
92
+ ];
93
+
94
+ /**
95
+ * level별 버튼
96
+ */
97
+ export const Level: Story = {
98
+ render: args => (
99
+ <>
100
+ {LEVELS.map(level => (
101
+ <Button {...args} level={level} key={level}>
102
+ {level}
103
+ </Button>
104
+ ))}
105
+ </>
106
+ ),
107
+ };
108
+
109
+ const ALIGN_OPTIONS: ButtonProps['align'][] = ['center', 'spaceBetween'];
110
+
111
+ /**
112
+ * align별 버튼
113
+ */
114
+ export const Align: Story = {
115
+ render: args => (
116
+ <>
117
+ {ALIGN_OPTIONS.map(align => (
118
+ <Button {...args} align={align} key={align}>
119
+ {align}
120
+ </Button>
121
+ ))}
122
+ </>
123
+ ),
124
+ };
125
+
126
+ const SIZE_OPTIONS: ButtonProps['size'][] = ['cta', 'l', 'm', 's'];
127
+
128
+ /**
129
+ * size별 버튼
130
+ */
131
+ export const Size: Story = {
132
+ render: args => (
133
+ <>
134
+ {SIZE_OPTIONS.map(size => (
135
+ <Button {...args} size={size} key={size}>
136
+ {size}
137
+ </Button>
138
+ ))}
139
+ </>
140
+ ),
141
+ };
142
+
143
+ /**
144
+ * 버튼의 비활성화 상태
145
+ */
146
+ export const Disabled: Story = {
147
+ render: args => (
148
+ <Button {...args} disabled>
149
+ Disabled
150
+ </Button>
151
+ ),
152
+ };
@@ -0,0 +1,93 @@
1
+ import { ButtonHTMLAttributes, forwardRef } from 'react';
2
+ import style from './style.module.scss';
3
+ import { VariantProps, cva } from 'class-variance-authority';
4
+ import { Slot } from '@radix-ui/react-slot';
5
+ import clsx from 'clsx';
6
+
7
+ const buttonVariants = cva(style.button, {
8
+ variants: {
9
+ level: {
10
+ primary: style.primary,
11
+ secondary: style.secondary,
12
+ tertiary: style.tertiary,
13
+ quaternary: style.quaternary,
14
+ quinary: style.quinary,
15
+ negative: style.negative,
16
+ inverse: style.inverse,
17
+ },
18
+ align: {
19
+ center: style['align-center'],
20
+ spaceBetween: style['align-space-between'],
21
+ },
22
+ size: {
23
+ cta: style.cta,
24
+ l: style.l,
25
+ m: style.m,
26
+ s: style.s,
27
+ },
28
+ },
29
+ });
30
+
31
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
32
+ asChild?: boolean;
33
+ align?: 'center' | 'spaceBetween';
34
+ level?: 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'quinary' | 'negative' | 'inverse';
35
+ size?: 'cta' | 'l' | 'm' | 's';
36
+ // isLoading?: boolean;
37
+ // leftIcon?: ReactNode;
38
+ // rightIcon?: ReactNode;
39
+ }
40
+
41
+ /**
42
+ * 버튼 컴포넌트
43
+ */
44
+ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
45
+ ({ asChild, level = 'primary', align = 'center', size = 'cta', ...props }, ref) => {
46
+ const Comp = asChild ? Slot : 'button';
47
+ return (
48
+ <>
49
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
50
+ <g clip-path="url(#clip0_1060_5432)">
51
+ <path
52
+ d="M10.8333 7H6.66667C6.29848 7 6 7.29848 6 7.66667V16.3333C6 16.7015 6.29848 17 6.66667 17H12.3368C12.1891 16.6891 12.0859 16.3531 12.0354 16H7V8H10.3333L11.3333 9.33333H17V12.3368C17.3748 12.5149 17.7129 12.7576 18 13.0505V9C18 8.63181 17.7015 8.33333 17.3333 8.33333H11.8333L10.8333 7Z"
53
+ fill="#1E1E1F"
54
+ />
55
+ <path
56
+ d="M15.0829 18.1665V16.0833H13V15.0833H15.0829V13H16.0829V15.0833H18.1665V16.0833H16.0829V18.1665H15.0829Z"
57
+ fill="#1E1E1F"
58
+ />
59
+ </g>
60
+ <defs>
61
+ <clipPath id="clip0_1060_5432">
62
+ <path
63
+ d="M0 4C0 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4V20C24 22.2091 22.2091 24 20 24H4C1.79086 24 0 22.2091 0 20V4Z"
64
+ fill="white"
65
+ />
66
+ </clipPath>
67
+ </defs>
68
+ </svg>
69
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
70
+ <g clip-path="url(#clip0_1060_5433)">
71
+ <path d="M11.1667 10.1667L11.1667 16.1667H10.1667L10.1667 10.1667H11.1667Z" fill="#1E1E1F" />
72
+ <path d="M13.8333 16.1667V10.1667H12.8333V16.1667H13.8333Z" fill="#1E1E1F" />
73
+ <path
74
+ fill-rule="evenodd"
75
+ clip-rule="evenodd"
76
+ d="M14.3333 7.66667V6C14.3333 5.63181 14.0348 5.33333 13.6667 5.33333H10.3333C9.96513 5.33333 9.66666 5.63181 9.66666 6V7.66667H6.16666V8.66667H7.0909L7.94487 18.0604C7.97609 18.4037 8.264 18.6667 8.6088 18.6667H15.3912C15.736 18.6667 16.0239 18.4037 16.0551 18.0604L16.9091 8.66667H17.8333V7.66667H14.3333ZM10.6667 6.33333V7.66667H13.3333V6.33333H10.6667ZM15.905 8.66667H8.09503L8.91321 17.6667H15.0868L15.905 8.66667Z"
77
+ fill="#1E1E1F"
78
+ />
79
+ </g>
80
+ <defs>
81
+ <clipPath id="clip0_1060_5433">
82
+ <path
83
+ d="M0 4C0 1.79086 1.79086 0 4 0H20C22.2091 0 24 1.79086 24 4V20C24 22.2091 22.2091 24 20 24H4C1.79086 24 0 22.2091 0 20V4Z"
84
+ fill="white"
85
+ />
86
+ </clipPath>
87
+ </defs>
88
+ </svg>
89
+ </>
90
+ );
91
+ // return <Comp className={clsx(buttonVariants({ level, align, size }))} ref={ref} {...props} />;
92
+ }
93
+ );
@@ -0,0 +1,134 @@
1
+ // @import "../../../../design-token/global.css";
2
+ // @use "../../../../design-token/global.css" as *;
3
+
4
+ .button {
5
+ position: relative;
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ border: none;
10
+
11
+ font-size: normal;
12
+ font-weight: var(--lp-pri-font-weight-700);
13
+ line-height: 130%; // TODO: 토큰
14
+ color: var(--inverse-label-static-primary);
15
+ background: var(--lp-pri-achromatic-white); // TODO: 토큰
16
+ overflow: hidden;
17
+
18
+ cursor: pointer;
19
+ // color: var(--brand-container-mid);
20
+
21
+ &:disabled {
22
+ background: var(--neutral-container-mid);
23
+ color: var(--neutral-label-tertiary);
24
+ cursor: not-allowed;
25
+ }
26
+ }
27
+
28
+ // level
29
+ .primary {
30
+ background: #4058FF; // TODO: 토큰 업데이트 (색상 다름)
31
+
32
+ &:not(:disabled):hover { // TODO: 토큰으로 변환
33
+ background: #3346cc;
34
+ }
35
+ }
36
+ .secondary {
37
+ background: var(--inverse-container-high);
38
+
39
+ &:not(:disabled):hover { // TODO: 토큰으로 변환
40
+ background: #121212;
41
+ }
42
+ }
43
+ .tertiary {
44
+ background: #6D6D7014;
45
+ color: var(--neutral-label-primary);
46
+
47
+ &:not(:disabled):hover { // TODO: 토큰으로 변환
48
+ background: #ebebeb;
49
+ }
50
+ }
51
+ .quaternary {
52
+ // TODO: 토큰 업데이트 neutral/border/overlay/normal
53
+ color: var(--neutral-label-primary);
54
+ border: 1px solid var(--neutral-border-overlay-normal);
55
+
56
+ &:not(:disabled):hover { // TODO: 토큰으로 변환
57
+ background: #f5f5f5;
58
+ }
59
+
60
+ &:disabled {
61
+ background: var(--neutral-container-mid);
62
+ color: var(--neutral-label-tertiary);
63
+ opacity: 0.4;
64
+ }
65
+ }
66
+ .quinary {
67
+ // color: var(--neutral-label-secondary);
68
+ color: #6D6D70CC; // TODO: 토큰 업데이트
69
+
70
+ &:not(:disabled):hover { // TODO: 토큰으로 변환
71
+ background: #f5f5f5;
72
+ }
73
+ &:disabled {
74
+ background: var(--neutral-container-mid);
75
+ color: var(--neutral-label-tertiary);
76
+ opacity: 0.4;
77
+ }
78
+ }
79
+ .negative {
80
+ // TODO: funtion/container/negative
81
+ background: var(--function-negative);
82
+
83
+ &:not(:disabled):hover { // TODO: 토큰으로 변환
84
+ background: #af1b1c;
85
+ }
86
+ }
87
+ .inverse {
88
+ // TODO: neutral/label/static/primary
89
+ color: var(--neutral-label-primary);
90
+
91
+ &:not(:disabled):hover { // TODO: 토큰으로 변환
92
+ background: #f5f5f5;
93
+ }
94
+ }
95
+
96
+ // size
97
+ .cta {
98
+ border-radius: 8px; // TODO: 토큰
99
+ padding: 13.5px 12px; // TODO: 토큰
100
+ font-size: var(--lp-pri-font-size-16);
101
+ min-width: 129px;
102
+ max-height: 48px;
103
+ }
104
+ .l {
105
+ border-radius: 6px; // TODO: 토큰
106
+ padding: 10.5px 8px; // TODO: 토큰
107
+ font-size: var(--lp-pri-font-size-15);
108
+ min-width: 107px;
109
+ max-height: 40px;
110
+ }
111
+ .m {
112
+ border-radius: 6px; // TODO: 토큰
113
+ padding: 7px 6px; // TODO: 토큰
114
+ font-size: var(--lp-pri-font-size-14);
115
+ font-weight: var(--lp-pri-font-weight-500);
116
+ min-width: 91px;
117
+ max-height: 32px;
118
+ }
119
+ .s {
120
+ border-radius: 6px; // TODO: 토큰
121
+ padding: 3.5px 6px; // TODO: 토큰
122
+ font-size: var(--lp-pri-font-size-13);
123
+ font-weight: var(--lp-pri-font-weight-500);
124
+ min-width: 89px;
125
+ max-height: 24px;
126
+ }
127
+
128
+ // align
129
+ .align-center {
130
+ justify-content: center;
131
+ }
132
+ .align-space-between {
133
+ justify-content: space-between;
134
+ }
@@ -0,0 +1,8 @@
1
+ import { Canvas, Meta } from '@storybook/blocks';
2
+ import * as SizeStories from './index.stories.ts';
3
+
4
+ <Meta of={SizeStories} />
5
+
6
+ <div>
7
+ <h1>Design Token: Border Radius 개발자 가이드</h1>
8
+ </div>
@@ -0,0 +1,17 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Color } from './index';
3
+
4
+ const meta = {
5
+ title: 'DesignToken/BorderRadius',
6
+ component: Color,
7
+ parameters: {
8
+ layout: 'fullscreen',
9
+ },
10
+ tags: ['!autodocs'],
11
+ } satisfies Meta<typeof Color>;
12
+
13
+ export default meta;
14
+
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ export const All: Story = {};
@@ -0,0 +1,29 @@
1
+ // import { radius } from '@liner-fe/design-token';
2
+
3
+ import { objectToArray } from '../../utils/object';
4
+
5
+ export const Color = () => (
6
+ <div style={{ display: 'flex', gap: '20px', justifyContent: 'center', alignItems: 'center', height: '100vh' }}>
7
+ {/* {objectToArray(radius).map(([key, value]) => {
8
+ return (
9
+ <div
10
+ style={{
11
+ backgroundColor: '#ededed',
12
+ borderRadius: `${value}px`,
13
+ width: '150px',
14
+ height: '150px',
15
+ justifyContent: 'center',
16
+ display: 'flex',
17
+ alignItems: 'center',
18
+ flexDirection: 'column',
19
+ gap: '12px',
20
+ fontWeight: 'bold',
21
+ }}
22
+ >
23
+ <div>{key}</div>
24
+ <div style={{ fontSize: '12px' }}>{value}px</div>
25
+ </div>
26
+ );
27
+ })} */}
28
+ </div>
29
+ );
@@ -0,0 +1,38 @@
1
+ import { Canvas, Meta } from '@storybook/blocks';
2
+ import * as SizeStories from './index.stories.ts';
3
+
4
+ <Meta of={SizeStories} />
5
+
6
+ <div>
7
+ <h1>Design Token: Color 개발자 가이드</h1>
8
+ </div>
9
+
10
+ primitve, system로 위계가 나뉩니다.
11
+
12
+ ```ts
13
+ const color = {
14
+ primitive,
15
+ system,
16
+ };
17
+ ```
18
+
19
+ primitive는 원시 값(hex값과 같은 실제 값)을 매핑 하고 있습니다. system은 시멘틱한 네이밍으로 primitive를 매핑하고 있습니다.
20
+
21
+ 그래서 대부분의 경우에는 system값을 사용해야하며, 불가피하게 primitive 값을 사용할 때는 프론트엔드 플래닛에 공유해주시길 바랍니다.
22
+
23
+ <h2>스타일링 라이브러리</h2>
24
+
25
+ <h3>CSS, SCSS</h3>
26
+
27
+ 플랫폼: liner-space
28
+
29
+ <h3>CSS-in-js</h3>
30
+
31
+ 플랫폼: liner-web, liner-be
32
+
33
+ <h3>React Native</h3>
34
+
35
+ 플랫폼: liner-mobile
36
+ 확인하지 않음
37
+
38
+ <h2>DarkMode를 구현하는 방법</h2>
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Color } from './index';
3
+ import { color } from '@liner-fe/design-token';
4
+
5
+ const meta = {
6
+ title: 'DesignToken/Color',
7
+ component: Color,
8
+ parameters: {
9
+ layout: 'fullscreen',
10
+ },
11
+ tags: ['!autodocs'],
12
+ } satisfies Meta<typeof Color>;
13
+
14
+ export default meta;
15
+
16
+ type Story = StoryObj<typeof meta>;
17
+
18
+ export const System: Story = {
19
+ args: {
20
+ type: 'system',
21
+ },
22
+ };
23
+
24
+ export const Primitive: Story = {
25
+ args: {
26
+ type: 'primitive',
27
+ },
28
+ };
@@ -0,0 +1,28 @@
1
+ import { useEffect } from 'react';
2
+
3
+ interface IProps {
4
+ type: 'primitive' | 'system';
5
+ }
6
+
7
+ export const Color = ({ type }: IProps) => {
8
+ // const { toggleTheme } = useDarkTheme();
9
+
10
+ return (
11
+ <div style={{ display: 'flex', flexWrap: 'wrap', gap: '10px', justifyContent: 'center', margin: '20px 0' }}>
12
+ {/* <div>
13
+ <button onClick={toggleTheme}>Dark theme</button>
14
+ {document.documentElement.getAttribute('color-theme')}
15
+ </div>
16
+
17
+ {objectToArray(type === 'primitive' ? color.color.primitive : color.color.system).map(([key, value]) => (
18
+ <div
19
+ key={key}
20
+ style={{ width: 200, height: 250, border: '1px solid #ededed', borderRadius: 10, textAlign: 'center' }}
21
+ >
22
+ <div style={{ backgroundColor: value, height: 150, borderRadius: '10px 10px 0 0' }}></div>
23
+ {key} {value}
24
+ </div>
25
+ ))} */}
26
+ </div>
27
+ );
28
+ };
@@ -0,0 +1,8 @@
1
+ import { Canvas, Meta } from '@storybook/blocks';
2
+ import * as SizeStories from './index.stories.ts';
3
+
4
+ <Meta of={SizeStories} />
5
+
6
+ <div>
7
+ <h1>Design Token: Opacity 개발자 가이드</h1>
8
+ </div>
@@ -0,0 +1,17 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Opacity } from './index';
3
+
4
+ const meta = {
5
+ title: 'DesignToken/Opacity',
6
+ component: Opacity,
7
+ parameters: {
8
+ layout: 'fullscreen',
9
+ },
10
+ tags: ['!autodocs'],
11
+ } satisfies Meta<typeof Opacity>;
12
+
13
+ export default meta;
14
+
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ export const All: Story = {};
@@ -0,0 +1 @@
1
+ export const Opacity = () => <div></div>;
@@ -0,0 +1,8 @@
1
+ import { Canvas, Meta } from '@storybook/blocks';
2
+ import * as SizeStories from './index.stories.ts';
3
+
4
+ <Meta of={SizeStories} />
5
+
6
+ <div>
7
+ <h1>Design Token: Size 개발자 가이드</h1>
8
+ </div>
@@ -0,0 +1,17 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Size } from './index';
3
+
4
+ const meta = {
5
+ title: 'DesignToken/Size',
6
+ component: Size,
7
+ parameters: {
8
+ layout: 'fullscreen',
9
+ },
10
+ tags: ['!autodocs'],
11
+ } satisfies Meta<typeof Size>;
12
+
13
+ export default meta;
14
+
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ export const All: Story = {};
@@ -0,0 +1,23 @@
1
+ import { objectToArray } from '@/utils/object';
2
+
3
+ export const Size = () => (
4
+ <div>
5
+ {/* {objectToArray(size).map(([key, value]) => {
6
+ return (
7
+ <div
8
+ style={{
9
+ backgroundColor: '#ededed',
10
+ width: `${value}px`,
11
+ height: `${value}px`,
12
+ justifyContent: 'center',
13
+ display: 'flex',
14
+ alignItems: 'center',
15
+ flexDirection: 'column',
16
+ gap: '12px',
17
+ fontWeight: 'bold',
18
+ }}
19
+ ></div>
20
+ );
21
+ })} */}
22
+ </div>
23
+ );
@@ -0,0 +1,8 @@
1
+ import { Canvas, Meta } from '@storybook/blocks';
2
+ import * as SizeStories from './index.stories.ts';
3
+
4
+ <Meta of={SizeStories} />
5
+
6
+ <div>
7
+ <h1>Design Token: Typography 개발자 가이드</h1>
8
+ </div>
@@ -0,0 +1,17 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Typography } from './index';
3
+
4
+ const meta = {
5
+ title: 'DesignToken/Typography',
6
+ component: Typography,
7
+ parameters: {
8
+ layout: 'fullscreen',
9
+ },
10
+ tags: ['!autodocs'],
11
+ } satisfies Meta<typeof Typography>;
12
+
13
+ export default meta;
14
+
15
+ type Story = StoryObj<typeof meta>;
16
+
17
+ export const All: Story = {};
@@ -0,0 +1,13 @@
1
+ export const Typography = () => (
2
+ <div>
3
+ {/* {objectToArray(font.size).map(([key, value]) => (
4
+ <div>
5
+ {key} {value}
6
+ </div>
7
+ ))} */}
8
+
9
+ {/* <p style={{ fontSize: '16px', fontWeight: 500, fontFamily: 'pretendard', lineHeight: 26 }}>Blah Blah</p>
10
+
11
+ <Display type={'accent'}>Blah Blah</Display> */}
12
+ </div>
13
+ );
package/src/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './utils/object';
2
+ export * from './components/Button';
@@ -0,0 +1,3 @@
1
+ export const objectToArray = <T extends Record<string, any>>(obj: T) => {
2
+ return Object.entries(obj);
3
+ };