typography 디자인 토큰 스토리 작성 - #23
Open
YuHyun-P wants to merge 3 commits into
Open
Conversation
Chromatic ReportSee Our Preivew ⚪️🔳🔲 |
YuHyun-P
commented
Jan 27, 2024
| import typography from "./typography"; | ||
|
|
||
| const meta: Meta<typeof Text> = { | ||
| title: "Design Tokens/Typography", |
Member
Author
There was a problem hiding this comment.
- Components
- Button
- Design Tokens
- Typography디자인 토큰 / 컴포넌트 그룹으로 나누면 좋을 거 같아서 우선 디자인 토큰만 폴더로 나눠봤습니다. 괜찮나요?
|
|
||
| import typography from "./typography"; | ||
|
|
||
| const meta: Meta<typeof Text> = { |
Member
Author
There was a problem hiding this comment.
typography는 컴포넌트가 아니라서 docs가 없어도 괜찮을 거 같은데 어떻게 생각하시나요!
Member
There was a problem hiding this comment.
저는 개인적으로 통일성때문에 있었으면 좋겠어요...😊
className에 적용해서 사용하면 된다는 간단한 설명 있으면 좋지 않을까요?
Comment on lines
+12
to
+20
| // radio label을 mm-semantic-typography-h1에서 h1로 변경 | ||
| labels: Object.fromEntries( | ||
| Object.entries(typography.$semantic).map(([key, value]) => [ | ||
| value, | ||
| key, | ||
| ]), | ||
| ), | ||
| }, |
Member
Author
Member
There was a problem hiding this comment.
ㅎㅎ 둘 다 좋아요! 보편적으로는 오른쪽이 보기 편한 것 같아요! 굿굿👍🏻
YuHyun-P
force-pushed
the
feature-#19
branch
from
February 23, 2024 13:19
90cf333 to
7bf8eba
Compare
YuHyun-P
commented
Feb 23, 2024
|
|
||
| import typography from "./typography"; | ||
|
|
||
| const meta: Meta<typeof Text> = { |
Comment on lines
+58
to
+64
| export interface TextProps<Key extends TypographySementicKey> { | ||
| /** className에 typography 토큰을 설정해 적용할 수 있습니다. */ | ||
| className: (typeof typography.$semantic)[Key]; | ||
| children: string; | ||
| } | ||
|
|
||
| export function Text<Key extends TypographySementicKey>({ |
Member
Author
There was a problem hiding this comment.
TextProps, Text는 스토리에서만 사용되는데 외부로 export 하는 이유는 스토리북 autodocs 때문입니다. autodocs 기능은 내부적으로 react-docgen-typescript를 사용하는데 props랑 컴포넌트를 named export 해야 적용된다네요!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


closed #19
✅ 작업 내용
typography.$semantic상수 타입화📌 이슈 사항
✍ 궁금한 점