From ed86aadd77275170537ce1dc285957135f02bb2e Mon Sep 17 00:00:00 2001 From: Evan Moon Date: Mon, 30 Nov 2020 12:17:34 +0900 Subject: [PATCH] =?UTF-8?q?feat(ui-kit):=20Text=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=20=EB=94=94=EC=9E=90=EC=9D=B8=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=20(#20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(ui-kit): Text 컴포넌트 디자인 변경 * chore(ui-kit): 스토리북에 깃 유저 정보 추가 * fix(ui-kit): 레퍼런스 타입이 이상하게 들어가 있던 부분 수정 --- .github/workflows/publish-storybook.yml | 4 ++++ ui-kit/src/components/Text/index.stories.tsx | 1 - ui-kit/src/components/Text/index.tsx | 4 ++-- ui-kit/src/components/Text/types.ts | 1 - ui-kit/src/sass/utils/_typography.scss | 25 +++++++++----------- 5 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish-storybook.yml b/.github/workflows/publish-storybook.yml index 80aacd66..700d9116 100644 --- a/.github/workflows/publish-storybook.yml +++ b/.github/workflows/publish-storybook.yml @@ -10,6 +10,10 @@ jobs: - uses: actions/setup-node@v1 with: node-version: 12 + - name: Set Git Configulations + run: | + git config --global user.email "lubycon@gmail.com" + git config --global user.name "lubycon" - name: Install depedencies run: yarn - name: Build Storybook diff --git a/ui-kit/src/components/Text/index.stories.tsx b/ui-kit/src/components/Text/index.stories.tsx index 06e380bc..bf4f170f 100644 --- a/ui-kit/src/components/Text/index.stories.tsx +++ b/ui-kit/src/components/Text/index.stories.tsx @@ -16,7 +16,6 @@ const typographyNames: { [key in Typographys]: string } = { h5: '머릿말 5', h6: '머릿말 6', subtitle: '부제', - button: '버튼', content: '본문 1', content2: '본문 2', caption: '캡션', diff --git a/ui-kit/src/components/Text/index.tsx b/ui-kit/src/components/Text/index.tsx index 93a8f07f..585dc33d 100644 --- a/ui-kit/src/components/Text/index.tsx +++ b/ui-kit/src/components/Text/index.tsx @@ -11,8 +11,8 @@ interface TextBaseProps { type TextProps = OverridableProps; const Text = ( - { typography = 'content', fontWeight, as, ...props }: TextProps, - ref: Ref + { typography = 'content', fontWeight = 'regular', as, ...props }: TextProps, + ref: Ref ) => { const target = as ?? DEFAULT_ELEMENT; const Component = target; diff --git a/ui-kit/src/components/Text/types.ts b/ui-kit/src/components/Text/types.ts index 48400e62..152578f3 100644 --- a/ui-kit/src/components/Text/types.ts +++ b/ui-kit/src/components/Text/types.ts @@ -6,7 +6,6 @@ export const typographys = [ 'h5', 'h6', 'subtitle', - 'button', 'content', 'content2', 'caption', diff --git a/ui-kit/src/sass/utils/_typography.scss b/ui-kit/src/sass/utils/_typography.scss index 06738646..260f70de 100644 --- a/ui-kit/src/sass/utils/_typography.scss +++ b/ui-kit/src/sass/utils/_typography.scss @@ -1,4 +1,4 @@ -@mixin _typography($name, $font-size, $font-weight, $line-height) { +@mixin _typography($name, $font-size, $line-height) { $font-size-number: strip-unit($font-size); :root { @@ -15,19 +15,16 @@ .lubycon-typography--#{$name} { @extend .lubycon-font-size--#{$font-size-number}; - @extend .lubycon-font-weight--#{$font-weight}; } } -@include _typography('h1', 42px, 'light', 63px); -@include _typography('h2', 32px, 'light', 48px); -@include _typography('h3', 28px, 'regular', 42px); -@include _typography('h4', 26px, 'regular', 40px); -@include _typography('h5', 24px, 'bold', 40px); -@include _typography('h6', 20px, 'bold', 40px); - -@include _typography('subtitle', 18px, 'regular', 31px); -@include _typography('button', 16px, 'bold', 28px); -@include _typography('content', 15px, 'regular', 26px); -@include _typography('content2', 13px, 'regular', 22px); -@include _typography('caption', 12px, 'regular', 21px); +@include _typography('h1', 42px, 63px); +@include _typography('h2', 32px, 48px); +@include _typography('h3', 28px, 42px); +@include _typography('h4', 26px, 40px); +@include _typography('h5', 24px, 36px); +@include _typography('h6', 20px, 30px); +@include _typography('subtitle', 18px, 31px); +@include _typography('content', 16px, 28px); +@include _typography('content2', 15px, 26px); +@include _typography('caption', 12px, 21px);