Skip to content

Commit

Permalink
fix: 자주 묻는 질문 중 아코디언 메뉴 수정
Browse files Browse the repository at this point in the history
1. 폰트 굵기 수정
2. 아이콘 정상 반영 진행
  • Loading branch information
klmhyeonwoo committed Nov 25, 2024
1 parent 214b2b2 commit ac2f446
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 35 deletions.
8 changes: 4 additions & 4 deletions public/images/16th/icon/common/arrow_b.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions public/images/16th/icon/common/arrow_w.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion src/components/FAQ/FAQ.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const layoutCss = (theme: Theme) => css`
padding: 120px 0;
display: flex;
flex-direction: column;
gap: 28px;
align-items: center;
justify-content: center;
background-color: ${theme.colors.lightGray};
Expand All @@ -66,13 +65,19 @@ const layoutCss = (theme: Theme) => css`

const tabLayoutCss = css`
display: flex;
margin: 28px 0 16px 0;
> li:first-of-type {
padding-left: 0px;
}
${mediaQuery('tablet')} {
justify-content: center;
}
${mediaQuery('mobile')} {
margin: 40px 0 16px 0;
}
`;

const tabWrapperCss = css`
Expand Down
34 changes: 9 additions & 25 deletions src/components/FAQ/FAQItem.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { css, Theme } from '@emotion/react';
import { motion, Variants } from 'framer-motion';

import { mediaQuery } from '~/styles/media';

import { NarrowArrowIcon } from '../Icons';
import { Icon } from '~/components/Icon/Icon';

interface FAQItemProps {
isOpen: boolean;
Expand All @@ -27,10 +25,10 @@ export function FAQItem({ isOpen, onClickOpenButton, question, answer }: FAQItem
transition={{ duration: 0.3, ease: 'easeOut' }}
css={theme => arrowContainerCss(theme, isOpen)}
>
<NarrowArrowIcon
<Icon
icon={isOpen ? 'ic_arrow_white' : 'ic_arrow_black'}
direction={isOpen ? 'up' : 'down'}
color={isOpen ? '' : '#FFFFFF'}
fill={isOpen ? '' : '#FFFFFF'}
size={24}
/>
</motion.div>
</motion.div>
Expand Down Expand Up @@ -71,21 +69,13 @@ const headerCss = (theme: Theme, isOpen: boolean) => css`
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 30px;
padding: 16px 30px;
border-radius: ${isOpen ? '12px 12px 0 0' : '12px'};
> h4 {
color: ${isOpen ? 'white' : 'black'};
text-align: center;
${theme.typosV2.pretendard.regular16}
}
${mediaQuery('mobile')} {
padding: 12px;
> h4 {
${theme.typosV2.pretendard.regular14}
}
text-align: left;
${theme.typosV2.pretendard.medium16}
}
`;

Expand All @@ -100,14 +90,8 @@ const bodyCss = (theme: Theme) => css`
background-color: white;
border-radius: 0 0 12px 12px;
> p {
padding: 12px 30px;
padding: 16px 30px;
color: black;
${theme.typosV2.pretendard.regular16};
}
${mediaQuery('mobile')} {
> p {
padding: 12px;
${theme.typosV2.pretendard.regular14}
}
${theme.typosV2.pretendard.medium16};
}
`;
10 changes: 10 additions & 0 deletions src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,24 @@ type Props = {
color?: string;
size?: string | number;
onClick?: () => void;
direction?: 'up' | 'right' | 'down' | 'left';
} & React.ButtonHTMLAttributes<HTMLButtonElement>;

const DEFAULT_ICON_COLOR = '#000000';

const DIRECTION_DEGREE = {
up: 180,
right: 270,
down: 0,
left: 90,
} as const;

export const Icon = memo(function Icon({
icon,
color = DEFAULT_ICON_COLOR,
size,
onClick,
direction = 'down',
...props
}: Props) {
const SVGIcon = icons[icon];
Expand All @@ -45,6 +54,7 @@ export const Icon = memo(function Icon({
color: ${color};
width: ${width};
max-height: fit-content;
transform: rotate(${DIRECTION_DEGREE[direction]}deg);
`}
/>
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/styles/typo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export const typosV2 = {
font-size: ${pxToRem(16)};
font-style: normal;
font-weight: 500;
line-height: ${pxToRem(19)};
line-height: ${pxToRem(24)};
letter-spacing: -0.05em;
`,
medium15: css`
Expand Down

0 comments on commit ac2f446

Please sign in to comment.