Skip to content

Commit 6768b0e

Browse files
authored
[FE] '체크리스트 배너 후버 색상을 넣는다' 를 dev 에 반영한다. (#1055)
2 parents 2f466b7 + 645a674 commit 6768b0e

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

frontend/src/components/ChecklistList/CustomBanner.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,22 @@ interface Props {
1010
buttonText: string;
1111
Icon: React.ReactElement;
1212
buttonDetailText: string;
13+
hoverButtonColor: string;
1314
}
1415

15-
const CustomBanner = ({ onClick, Icon, title, buttonColor, buttonText, buttonDetailText }: Props) => {
16+
const CustomBanner = ({ hoverButtonColor, onClick, Icon, title, buttonColor, buttonText, buttonDetailText }: Props) => {
1617
return (
1718
<S.Banner onClick={onClick}>
1819
<S.Wrapper>
1920
{Icon}
2021
<S.Title>{title}</S.Title>
2122
</S.Wrapper>
22-
<S.Button aria-label={buttonDetailText} label={buttonText} buttonColor={buttonColor} />
23+
<S.Button
24+
aria-label={buttonDetailText}
25+
label={buttonText}
26+
buttonColor={buttonColor}
27+
hoverButtonColor={hoverButtonColor}
28+
/>
2329
</S.Banner>
2430
);
2531
};
@@ -51,7 +57,7 @@ const S = {
5157
Title: styled.span`
5258
${flexCenter}
5359
`,
54-
Button: styled(Button)<{ buttonColor: string }>`
60+
Button: styled(Button)<{ buttonColor: string; hoverButtonColor: string }>`
5561
padding: 0.6rem 1rem;
5662
5763
background-color: ${({ buttonColor }) => buttonColor};
@@ -62,5 +68,9 @@ const S = {
6268
font-size: ${({ theme }) => theme.text.size.small};
6369
6470
cursor: pointer;
71+
72+
&:hover {
73+
background-color: ${({ hoverButtonColor }) => hoverButtonColor};
74+
}
6575
`,
6676
};

frontend/src/pages/ChecklistListPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ const ChecklistListPage = () => {
4747
buttonColor={theme.palette.green500}
4848
buttonText="편집하기"
4949
buttonDetailText={'체크리스트 질문을 편집하려면 이 버튼을 누르세요.'}
50+
hoverButtonColor={theme.palette.green600}
5051
/>
5152
<CustomBanner
5253
onClick={handleClickMoveQuestionSelectPage}
5354
Icon={<LampIcon width={30} height={30} aria-hidden="true" />}
54-
title={'체크리스트를 비교'}
55+
title={'체크리스트 비교'}
5556
buttonColor={theme.palette.yellow600}
5657
buttonText="비교하기"
5758
buttonDetailText={'체크리스트 질문을 편집하려면 이 버튼을 누르세요.'}
59+
hoverButtonColor={theme.palette.yellow700}
5860
/>
5961
</FlexBox.Vertical>
6062
<S.Spacer height="1.4rem" />

0 commit comments

Comments
 (0)