Skip to content

Commit

Permalink
HOTFIX: 폰트 사이즈 크기 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
KimKyuHoi committed Sep 21, 2024
1 parent 98a739b commit c62aa58
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
2 changes: 2 additions & 0 deletions src/components/common/button/CompleteBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ const Button = styled.button<IButton>`
return 'var(--font-size-sm)';
case 'xs':
return 'var(--font-size-xs)';
case 'xxs':
return 'var(--font-size-xxs)';
default:
return 'var(--font-size-md)';
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/common/typography/Text.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from '@emotion/styled';

interface IText {
size?: 'xs' | 'sm' | 'md' | 'lg' | 'mxl' | 'xl' | 'xxl';
size?: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'mxl' | 'xl' | 'xxl';
color?: 'white' | 'black' | 'placeholder' | string;
weight?: 'light' | 'normal' | 'bold' | string;
whiteSpace?: 'nowrap' | 'normal' | 'pre-line';
Expand Down Expand Up @@ -34,6 +34,8 @@ const Text = styled.span<IText>`
font-size: ${(props) => {
switch (props.size) {
case 'xxs':
return 'var(--font-size-xxs)';
case 'xs':
return 'var(--font-size-xs)';
case 'sm':
Expand Down
6 changes: 3 additions & 3 deletions src/pages/main/components/PCRotateCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ const PCRotateCarousel = ({
weight='700'
color='black'
whiteSpace='normal'
size='lg'
size='md'
>
{cardData[index].mainText}
</CardMainText>
<Text weight='500' color='black' whiteSpace='normal' size='sm'>
<Text weight='500' color='black' whiteSpace='normal' size='xs'>
{cardData[index].subText}
</Text>
<hr
Expand All @@ -86,7 +86,7 @@ const PCRotateCarousel = ({
<CompleteBtnWrapper>
<Link to='/techblog'>
<CompleteBtn
size='md'
size='xs'
type='button'
color='blue'
backgroundColor='blue'
Expand Down
8 changes: 4 additions & 4 deletions src/pages/main/components/Tablet/TabletRotateCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ const TabletRotateCarousel = ({
weight='700'
color='black'
whiteSpace='normal'
size='sm'
size='xs'
>
{cardData[index].mainText}
</CardMainText>
<Text weight='500' color='black' whiteSpace='normal' size='xs'>
<Text weight='500' color='black' whiteSpace='normal' size='xxs'>
{cardData[index].subText}
</Text>
<hr
Expand All @@ -71,7 +71,7 @@ const TabletRotateCarousel = ({
/>
<MobileContentText
color='black'
size='xs'
size='xxs'
weight='500'
whiteSpace='normal'
>
Expand All @@ -80,7 +80,7 @@ const TabletRotateCarousel = ({
<CompleteBtnWrapper>
<Link to='/techblog'>
<CompleteBtn
size='xs'
size='xxs'
type='button'
color='blue'
backgroundColor='blue'
Expand Down
4 changes: 4 additions & 0 deletions src/styles/GlobalStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const fontSizeLg = '1.25rem'; // 20px
const fontSizeMd = '1rem'; // 16px
const fontSizeSm = '0.875rem'; // 14px
const fontSizeXs = '0.75rem'; // 12px
const fontSizeXxs = '0.625rem'; // 10px

const sizeXxl = '2.5rem'; //40px
const sizeMxl = '2.25rem'; // 36px
Expand All @@ -16,6 +17,7 @@ const sizeLg = '1.25rem'; // 20px
const sizeMd = '1rem'; // 16px
const sizeSm = '0.875rem'; // 14px
const sizeXs = '0.75rem'; // 12px
const sizeXxs = '0.625rem'; // 10px

//color 정의
const colorAbony = '#1A122B';
Expand Down Expand Up @@ -73,6 +75,7 @@ export const GlobalStyle = css`
--font-size-md: ${fontSizeMd};
--font-size-sm: ${fontSizeSm};
--font-size-xs: ${fontSizeXs};
--font-size-xxs: ${fontSizeXxs};
--size-xxl: ${sizeXxl};
--size-mxl: ${sizeMxl};
Expand All @@ -81,6 +84,7 @@ export const GlobalStyle = css`
--size-md: ${sizeMd};
--size-sm: ${sizeSm};
--size-xs: ${sizeXs};
--size-xxs: ${sizeXxs};
--color-transparent: ${colorTransParent};
--color-white: ${colorWhite};
Expand Down
2 changes: 1 addition & 1 deletion src/types/ButtonInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export interface IButton extends React.ButtonHTMLAttributes<HTMLButtonElement> {
color: string;
backgroundColor: string;
hoverColor: string;
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | undefined;
size?: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | undefined;
type: 'button' | 'submit' | 'reset' | undefined;
children: React.ReactNode;
}
Expand Down

0 comments on commit c62aa58

Please sign in to comment.