Skip to content

Commit

Permalink
feat(ui-kit): Text 컴포넌트 디자인 변경 (#20)
Browse files Browse the repository at this point in the history
* feat(ui-kit): Text 컴포넌트 디자인 변경

* chore(ui-kit): 스토리북에 깃 유저 정보 추가

* fix(ui-kit): 레퍼런스 타입이 이상하게 들어가 있던 부분 수정
  • Loading branch information
evan-moon authored Nov 30, 2020
1 parent 3020f6b commit ed86aad
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/publish-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion ui-kit/src/components/Text/index.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const typographyNames: { [key in Typographys]: string } = {
h5: '머릿말 5',
h6: '머릿말 6',
subtitle: '부제',
button: '버튼',
content: '본문 1',
content2: '본문 2',
caption: '캡션',
Expand Down
4 changes: 2 additions & 2 deletions ui-kit/src/components/Text/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ interface TextBaseProps {
type TextProps<T extends ElementType = typeof DEFAULT_ELEMENT> = OverridableProps<T, TextBaseProps>;

const Text = <T extends ElementType = typeof DEFAULT_ELEMENT>(
{ typography = 'content', fontWeight, as, ...props }: TextProps<T>,
ref: Ref<HTMLButtonElement>
{ typography = 'content', fontWeight = 'regular', as, ...props }: TextProps<T>,
ref: Ref<any>
) => {
const target = as ?? DEFAULT_ELEMENT;
const Component = target;
Expand Down
1 change: 0 additions & 1 deletion ui-kit/src/components/Text/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const typographys = [
'h5',
'h6',
'subtitle',
'button',
'content',
'content2',
'caption',
Expand Down
25 changes: 11 additions & 14 deletions ui-kit/src/sass/utils/_typography.scss
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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);

0 comments on commit ed86aad

Please sign in to comment.