-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typography 디자인 토큰 스토리 작성 #23
base: main
Are you sure you want to change the base?
Conversation
Chromatic ReportSee Our Preivew ⚪️🔳🔲 |
import typography from "./typography"; | ||
|
||
const meta: Meta<typeof Text> = { | ||
title: "Design Tokens/Typography", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Components
- Button
- Design Tokens
- Typography
디자인 토큰 / 컴포넌트 그룹으로 나누면 좋을 거 같아서 우선 디자인 토큰만 폴더로 나눠봤습니다. 괜찮나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아우 너무 좋아요 ㅎㅎ
|
||
import typography from "./typography"; | ||
|
||
const meta: Meta<typeof Text> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typography는 컴포넌트가 아니라서 docs가 없어도 괜찮을 거 같은데 어떻게 생각하시나요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 개인적으로 통일성때문에 있었으면 좋겠어요...😊
className에 적용해서 사용하면 된다는 간단한 설명 있으면 좋지 않을까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋습니다!! 반영했습니다 7bf8eba
// radio label을 mm-semantic-typography-h1에서 h1로 변경 | ||
labels: Object.fromEntries( | ||
Object.entries(typography.$semantic).map(([key, value]) => [ | ||
value, | ||
key, | ||
]), | ||
), | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅎㅎ 둘 다 좋아요! 보편적으로는 오른쪽이 보기 편한 것 같아요! 굿굿👍🏻
90cf333
to
7bf8eba
Compare
|
||
import typography from "./typography"; | ||
|
||
const meta: Meta<typeof Text> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋습니다!! 반영했습니다 7bf8eba
export interface TextProps<Key extends TypographySementicKey> { | ||
/** className에 typography 토큰을 설정해 적용할 수 있습니다. */ | ||
className: (typeof typography.$semantic)[Key]; | ||
children: string; | ||
} | ||
|
||
export function Text<Key extends TypographySementicKey>({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TextProps
, Text
는 스토리에서만 사용되는데 외부로 export
하는 이유는 스토리북 autodocs 때문입니다. autodocs 기능은 내부적으로 react-docgen-typescript를 사용하는데 props랑 컴포넌트를 named export 해야 적용된다네요!
closed #19
✅ 작업 내용
typography.$semantic
상수 타입화📌 이슈 사항
✍ 궁금한 점