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

[FIX] 공통 모달 퍼블리싱 수정 #75

Merged
merged 14 commits into from
Jul 10, 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
6 changes: 2 additions & 4 deletions src/assets/svg/SettingCheck1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/assets/svg/SettingCheck1Icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/assets/svg/SettingCheck3Icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/assets/svg/SettingCheck4Icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/assets/svg/SettingXIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/svg/clock-check.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/assets/svg/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Icn_arrow_narrow_right from '@/assets/svg/arrow-narrow-right.svg?react';
import Arrow_up from '@/assets/svg/arrow-up.svg?react';
import Icn_calander from '@/assets/svg/calendar-minus-01.svg?react';
import ClockCheck from '@/assets/svg/clock-check.svg?react';
import Icn_date_clock from '@/assets/svg/clock.svg?react';
import DeleteIcon from '@/assets/svg/Delete.svg?react';
import DoneIcon from '@/assets/svg/DoneIcon.svg?react';
Expand Down Expand Up @@ -69,6 +70,7 @@ const Icons = {
DoneIcon,
ProgressIcon,
TimelineDelete,
ClockCheck,
plus_circle,
};

Expand Down
4 changes: 2 additions & 2 deletions src/components/SettingPage/AccountArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import styled from '@emotion/styled';

import google_calendar from '@/assets/images/google_calendar.png';
import Icons from '@/assets/svg/index';
import SettingXBtn from '@/components/common/button/settingBtn/SettingXBtn';
import SettingCheckBtn from '@/components/common/button/settingBtn/SettingCheckBtn';
import USERS from '@/constants/users';

function AccountArea() {
Expand All @@ -19,7 +19,7 @@ function AccountArea() {
</CalendarContainer>
<InputBox>
<EmailWrapper>{USERS.data.email}</EmailWrapper>
<SettingXBtn />
<SettingCheckBtn size="small" type="close" isHover isPressed={false} isActive />
</InputBox>
</AccountWrapper>
</AccountAreaWrapper>
Expand Down
26 changes: 26 additions & 0 deletions src/components/calendarPage/CategoryBox.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import styled from '@emotion/styled';

function CategoryBox() {
return (
<CategoryBoxLayout>
<TitleSection>카테고리</TitleSection>
</CategoryBoxLayout>
);
}

const CategoryBoxLayout = styled.div`
width: 31.7rem;
height: 49rem;

border: 1px solid #e4e4e4;
border-radius: 12px;
`;

const TitleSection = styled.section`
width: 100%;
height: 6.6rem;
padding: 2rem 0.8rem 1.8rem 2.8rem;

${({ theme }) => theme.fontTheme.HEADLINE_02}
`;
export default CategoryBox;
4 changes: 2 additions & 2 deletions src/components/common/button/CancelWhiteBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import styled from '@emotion/styled';

import Icons from '@/assets/svg/index';

function DeleteBtn() {
function CancelWhiteBtn() {
return (
<DeleteBtnLayout>
<StlyedDeleteIcon />
</DeleteBtnLayout>
);
}

export default DeleteBtn;
export default CancelWhiteBtn;

const DeleteBtnLayout = styled.button`
display: flex;
Expand Down
73 changes: 0 additions & 73 deletions src/components/common/button/Check1Btn.tsx

This file was deleted.

12 changes: 12 additions & 0 deletions src/components/common/button/OkayCancelBtn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ const OkayBtn = styled.button`

background-color: ${({ theme }) => theme.palette.Grey.Black};
${({ theme }) => theme.fontTheme.BODY_02};

&:hover {
color: ${({ theme }) => theme.palette.Grey.White};

background-color: ${({ theme }) => theme.palette.Grey.Grey7};
}
`;

const CancelBtn = styled.button`
Expand All @@ -35,4 +41,10 @@ const CancelBtn = styled.button`

background-color: ${({ theme }) => theme.palette.Grey.White};
${({ theme }) => theme.fontTheme.BODY_02};

&:hover {
color: ${({ theme }) => theme.palette.Grey.Grey6};

background-color: ${({ theme }) => theme.palette.Grey.Grey3};
}
`;
19 changes: 0 additions & 19 deletions src/components/common/button/settingBtn/SettingCheck2Btn.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions src/components/common/button/settingBtn/SettingCheck3Btn.tsx

This file was deleted.

52 changes: 0 additions & 52 deletions src/components/common/button/settingBtn/SettingCheck4Btn.tsx

This file was deleted.

46 changes: 46 additions & 0 deletions src/components/common/button/settingBtn/SettingCheckBtn.tsx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

헉 진짜 깔끔하다 👍 👍 굳굳

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import styled from '@emotion/styled';
import { FunctionComponent, SVGProps } from 'react';

import Icons from '@/assets/svg/index';
import { SettingLayout, smallIcon, bigIcon } from '@/components/common/button/settingBtn/settingBtnStyle';

const settingIconMap: Record<string, FunctionComponent<SVGProps<SVGSVGElement>>> = {
complete: Icons.SettingIcons.SettingCheck1,
check: Icons.SettingIcons.SettingCheck2,
done: Icons.SettingIcons.SettingCheck3,
progress: Icons.SettingIcons.SettingCheck4,
close: Icons.SettingX,
};
interface SettingCheckBtnProps {
size: 'small' | 'big';
type: 'complete' | 'check' | 'done' | 'progress' | 'close';
onClick?: () => void;
isHover: boolean;
isPressed: boolean;
isActive: boolean;
}

function SettingCheckBtn({ size, type, onClick, isHover, isPressed, isActive }: SettingCheckBtnProps) {
const IconComponent = settingIconMap[type];

const isFill = type === 'progress';

const StyledSettingCheckIcon = styled(IconComponent)<{ size: string }>`
${({ size }) => (size === 'small' ? smallIcon : bigIcon)};
Comment on lines +24 to +29
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아이콘 맵 함수로 빼는 법 배우고 갑니다 ㅎㅎ 굿굿

`;

return (
<SettingLayout
size={size}
isFill={isFill}
onClick={onClick}
isHover={isHover}
isPressed={isPressed}
isActive={isActive}
>
<StyledSettingCheckIcon size={size} />
</SettingLayout>
);
}

export default SettingCheckBtn;
19 changes: 0 additions & 19 deletions src/components/common/button/settingBtn/SettingXBtn.tsx

This file was deleted.

Loading
Loading