Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

최신 버전의 수정사항을 dev를 main 에 반영한다. #1056

Merged
merged 2 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions frontend/src/components/ChecklistList/CustomBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@ interface Props {
buttonText: string;
Icon: React.ReactElement;
buttonDetailText: string;
hoverButtonColor: string;
}

const CustomBanner = ({ onClick, Icon, title, buttonColor, buttonText, buttonDetailText }: Props) => {
const CustomBanner = ({ hoverButtonColor, onClick, Icon, title, buttonColor, buttonText, buttonDetailText }: Props) => {
return (
<S.Banner onClick={onClick}>
<S.Wrapper>
{Icon}
<S.Title>{title}</S.Title>
</S.Wrapper>
<S.Button aria-label={buttonDetailText} label={buttonText} buttonColor={buttonColor} />
<S.Button
aria-label={buttonDetailText}
label={buttonText}
buttonColor={buttonColor}
hoverButtonColor={hoverButtonColor}
/>
</S.Banner>
);
};
Expand Down Expand Up @@ -51,7 +57,7 @@ const S = {
Title: styled.span`
${flexCenter}
`,
Button: styled(Button)<{ buttonColor: string }>`
Button: styled(Button)<{ buttonColor: string; hoverButtonColor: string }>`
padding: 0.6rem 1rem;

background-color: ${({ buttonColor }) => buttonColor};
Expand All @@ -62,5 +68,9 @@ const S = {
font-size: ${({ theme }) => theme.text.size.small};

cursor: pointer;

&:hover {
background-color: ${({ hoverButtonColor }) => hoverButtonColor};
}
`,
};
4 changes: 3 additions & 1 deletion frontend/src/pages/ChecklistListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ const ChecklistListPage = () => {
buttonColor={theme.palette.green500}
buttonText="편집하기"
buttonDetailText={'체크리스트 질문을 편집하려면 이 버튼을 누르세요.'}
hoverButtonColor={theme.palette.green600}
/>
<CustomBanner
onClick={handleClickMoveQuestionSelectPage}
Icon={<LampIcon width={30} height={30} aria-hidden="true" />}
title={'체크리스트를 비교'}
title={'체크리스트 비교'}
buttonColor={theme.palette.yellow600}
buttonText="비교하기"
buttonDetailText={'체크리스트 질문을 편집하려면 이 버튼을 누르세요.'}
hoverButtonColor={theme.palette.yellow700}
/>
</FlexBox.Vertical>
<S.Spacer height="1.4rem" />
Expand Down
Loading