diff --git a/src/components/BottomButton/index.tsx b/src/components/BottomButton/index.tsx index ae90603e..008f9755 100644 --- a/src/components/BottomButton/index.tsx +++ b/src/components/BottomButton/index.tsx @@ -8,7 +8,7 @@ const BottomButton: React.FC = ({ content, onClick, disabled <> diff --git a/src/components/BottomButton/styles.tsx b/src/components/BottomButton/styles.tsx index bcd7dc6d..01419434 100644 --- a/src/components/BottomButton/styles.tsx +++ b/src/components/BottomButton/styles.tsx @@ -8,14 +8,14 @@ export const ButtonWrapper = styled.div` transform: translateX(-50%); width: 100%; height: 6.25rem; - background-color: ${({ theme }) => theme.colors.white}; + background-color: ${({ theme }) => theme.colors.background.primary}; justify-content: flex-end; z-index: 1; border: none; `; export const Button = styled.button<{ disabled: boolean }>` - background: ${({ disabled, theme }) => + background: ${({ disabled, theme }) => //theme에 없어서 그냥 뒀음 disabled ? 'linear-gradient(93deg, #FFC1D6 1.22%, #F8D4D4 99.73%)' : theme.colors.brand.gradient}; border-radius: 0.625rem; font-size: 1rem; diff --git a/src/pages/AccountCancel/index.tsx b/src/pages/AccountCancel/index.tsx index 3f155c35..6fab95fb 100644 --- a/src/pages/AccountCancel/index.tsx +++ b/src/pages/AccountCancel/index.tsx @@ -1,16 +1,27 @@ import React, { useState } from 'react'; -import { CancelContainer, SubTitle, Text, InfoBox, InfoItem, CheckboxWrapper, CheckboxInput } from './styles'; -import { StyledText } from '../../components/Text/StyledText'; -import theme from '../../styles/theme'; -import { OODDFrame } from '../../components/Frame/Frame'; +import { + CancelContainer, + SubTitle, + Text, + InfoBox, + InfoItem, + CheckboxWrapper, + CheckboxInput, + Label, + StyledCheckboxText, + StyledDiv, +} from './styles'; // 상대 경로 index 명시 +import { StyledText } from '@components/Text/StyledText'; +import theme from '@styles/theme'; +import { OODDFrame } from '@components/Frame/Frame'; import { useNavigate } from 'react-router-dom'; -import TopBar from '../../components/TopBar'; -import back from '../../assets/arrow/left.svg'; +import TopBar from '@components/TopBar/index'; +import back from '@assets/arrow/left.svg'; -import BottomButton from '../../components/BottomButton'; -import { patchUserWithdrawApi } from '../../apis/user'; -import Modal from '../../components/Modal'; +import BottomButton from '@components/BottomButton/index'; +import { patchUserWithdrawApi } from '@apis/user'; +import Modal from '@components/Modal/index'; const AccountCancel: React.FC = () => { const [isChecked, setIsChecked] = useState(false); @@ -74,12 +85,12 @@ const AccountCancel: React.FC = () => { navigate(-1)} /> - + OOTD 탈퇴 전 확인하세요! - + {`탈퇴하시면 이용 중인 서비스가 폐쇄되며,\n모든 데이터는 복구할 수 없습니다.`} @@ -87,32 +98,26 @@ const AccountCancel: React.FC = () => { 지금까지 OODD를 이용해주셔서 감사합니다! - -
+ -
+ {isModalVisible && ( theme.colors.background.secondary}; + padding: 70px; margin-top: 10px; border-radius: 10px; - margin: 10px 20px 1.25rem 20px; /* 10px 위 여백, 20px 좌우 여백, 20px 아래 여백 */ + margin: 10px 20px 1.25rem 20px; `; export const InfoItem = styled.p` - font-size: 0.875rem; /* 14px */ - margin-bottom: 0.625rem; /* 10px */ + font-size: 0.875rem; + margin-bottom: 0.625rem; padding: 2px 10px; display: flex; justify-content: center; align-items: center; text-align: center; - height: 100%; /* 부모 컨테이너의 높이에 맞추기 */ + height: 100%; `; export const CheckboxWrapper = styled.div` @@ -56,46 +53,49 @@ export const CheckboxWrapper = styled.div` padding: 0rem 15px; input[type='checkbox'] { - margin-right: 0.625rem; /* 10px */ + margin-right: 0.625rem; } `; export const CheckboxInput = styled.input` margin-right: 0.625rem; cursor: pointer; - appearance: none; /* 기본 스타일 제거 */ + appearance: none; width: 1.25rem; height: 1.25rem; - border: 0.125rem solid #e0e0e0; + border: 0.125rem solid ${({ theme }) => theme.colors.gray[200]}; border-radius: 0.25rem; position: relative; &:checked { - background-color: #ffbbda; - border-color: #ff2389; - } + background-color: ${({ theme }) => theme.colors.background.primaryLight}; + border-color: ${({ theme }) => theme.colors.brand.primary}; +} + &:checked::after { content: '✓'; - color: white; + color: ${({ theme }) => theme.colors.contrast}; font-size: 0.875rem; position: absolute; top: 50%; left: 50%; - transform: translate(-50%, -50%); /* 정확히 중앙으로 배치 */ + transform: translate(-50%, -50%); } `; -export const StyledButton = styled.button` - margin-top: 18.75rem; /* 300px */ - background: ${(props) => (props.isChecked ? 'black' : '#ccc')}; - border-radius: 0.5rem; /* 8px */ - border: none; - padding: 1.5625rem; /* 25px */ - text-align: center; - font-size: 1rem; /* 16px */ - color: white; - cursor: ${(props) => (props.isChecked ? 'pointer' : 'not-allowed')}; +export const Label = styled.label` + display: flex; + align-items: center; + cursor: pointer; +`; - &:disabled { - background: #00000080; - } +export const StyledCheckboxText = styled(StyledText)` + color: ${({ theme }) => theme.colors.text.caption}; `; + +export const StyledDiv = styled.div<{ isChecked: boolean }>` + background-color: ${({ isChecked, theme }) => + isChecked ? theme.colors.primary : theme.colors.gray[300]}; + color: ${({ isChecked, theme }) => + isChecked ? theme.colors.contrast : theme.colors.caption}; + cursor: ${({ isChecked }) => (isChecked ? 'pointer' : 'not-allowed')}; +`; \ No newline at end of file diff --git a/src/pages/AccountEdit/index.tsx b/src/pages/AccountEdit/index.tsx index f78907b7..d41be4d8 100644 --- a/src/pages/AccountEdit/index.tsx +++ b/src/pages/AccountEdit/index.tsx @@ -12,19 +12,18 @@ import { MemberInfoRow, Label, Info, -} from './styles'; -import { OODDFrame } from '../../components/Frame/Frame'; - -import BottomButton from '../../components/BottomButton'; // BottomButton 컴포넌트 임포트 +} from './styles'; +import { OODDFrame } from '@components/Frame/Frame'; +import BottomButton from '@components/BottomButton/index'; import { useNavigate } from 'react-router-dom'; -import { StyledText } from '../../components/Text/StyledText'; -import theme from '../../styles/theme'; +import { StyledText } from '@components/Text/StyledText'; +import theme from '@styles/theme'; -import naver from '../../assets/default/snsIcon/naver.svg'; -import kakao from '../../assets/default/snsIcon/kakao.svg'; -import TopBar from '../../components/TopBar'; -import back from '../../assets/arrow/left.svg'; +import naver from '@assets/default/snsIcon/naver.svg'; +import kakao from '@assets/default/snsIcon/kakao.svg'; +import TopBar from '@components/TopBar/index'; +import back from '@assets/arrow/left.svg'; const AccountEdit: React.FC = () => { const navigate = useNavigate(); // useNavigate 훅 사용 @@ -41,18 +40,18 @@ const AccountEdit: React.FC = () => {
- + 로그인 정보 - + SNS 연결 - + 연결된 SNS계정으로 로그인되었습니다. @@ -64,14 +63,14 @@ const AccountEdit: React.FC = () => {
- + 회원 정보 @@ -79,7 +78,7 @@ const AccountEdit: React.FC = () => { diff --git a/src/pages/AccountEdit/styles.tsx b/src/pages/AccountEdit/styles.tsx index ac5ea79b..f52e42a8 100644 --- a/src/pages/AccountEdit/styles.tsx +++ b/src/pages/AccountEdit/styles.tsx @@ -1,92 +1,91 @@ import styled from 'styled-components'; export const ProfileEditContainer = styled.div` - max-width: 512px; /* 32rem */ + max-width: 512px; display: flex; flex-direction: column; position: relative; `; export const Section = styled.div` - margin-top: 1.875rem; /* 30px */ - - margin-bottom: 1.875rem; /* 30px */ - width: 100%; /* Section이 부모 컨테이너의 전체 너비를 차지하도록 설정 */ + margin-top: 1.875rem; + margin-bottom: 1.875rem; + width: 100%; padding: 0px 30px; `; export const SectionTitle = styled.div` - font-size: 1.125rem; /* 18px */ + font-size: 1.125rem; font-weight: bold; - margin-bottom: 0.625rem; /* 10px */ - margin-top: 1.125rem; /* 18px */ - text-align: left; /* 텍스트를 왼쪽 정렬 */ + margin-bottom: 0.625rem; + margin-top: 1.125rem; + text-align: left; `; export const SNSInfo = styled.div` display: flex; flex-direction: column; - margin-bottom: 0.625rem; /* 10px */ - margin-top: 3.125rem; /* 50px */ + margin-bottom: 0.625rem; + margin-top: 3.125rem; `; export const SNSInfoRow = styled.div` display: flex; align-items: center; - margin-bottom: 0.625rem; /* 10px */ + margin-bottom: 0.625rem; `; export const SNSIcon = styled.img` - width: 2.5rem; /* 40px */ - height: 2.5rem; /* 40px */ - margin-right: 0.625rem; /* 10px */ + width: 2.5rem; + height: 2.5rem; + margin-right: 0.625rem; margin-top: 1.875rem; flex-shrink: 0; object-fit: cover; `; export const Text = styled.div` - font-size: 0.875rem; /* 14px */ - color: #666; + font-size: 0.875rem; + color: ${({ theme }) => theme.colors.tertiary}; margin-top: 2.1875rem; - text-align: left; /* 텍스트를 왼쪽 정렬 */ + text-align: left; `; export const SnsConnection = styled.div` - font-size: 1rem; /* 16px */ + font-size: 1rem; font-weight: bold; - color: #333; - margin-bottom: 0.625rem; /* 10px */ - text-align: left; /* 텍스트를 왼쪽 정렬 */ + color: ${({ theme }) => theme.colors.gray[700]}; + margin-bottom: 0.625rem; + text-align: left; `; export const MemberInfo = styled.div` display: flex; flex-direction: column; margin-top: 35px; - width: 100%; /* 부모 컨테이너의 전체 너비를 차지하도록 설정 */ + width: 100%; `; export const MemberInfoRow = styled.div` display: flex; align-items: center; - justify-content: flex-start; /* 아이템들을 왼쪽으로 정렬 */ - margin-bottom: 0.625rem; /* 10px */ + justify-content: flex-start; + margin-bottom: 0.625rem; margin-top: 10px; `; export const Label = styled.div` - font-size: 0.875rem; /* 14px */ - color: #333; + font-size: 0.875rem; + color: ${({ theme }) => theme.colors.gray[700]}; display: flex; align-items: center; - width: 6.25rem; /* 100px, 라벨의 고정 너비 설정 */ + width: 6.25rem; `; export const Info = styled.div` - font-size: 0.875rem; /* 14px */ - color: #999; - margin-left: 0.625rem; /* 10px */ - flex-grow: 1; /* 라벨과 함께 라인을 맞추기 위해 넓이를 확장 */ - text-align: left; /* 텍스트를 왼쪽 정렬 */ + font-size: 0.875rem; + color: ${({ theme }) => theme.colors.caption}; + margin-left: 0.625rem; + flex-grow: 1; + text-align: left; `; diff --git a/src/pages/AccountSetting/index.tsx b/src/pages/AccountSetting/index.tsx index 7da01656..c16e8fbf 100644 --- a/src/pages/AccountSetting/index.tsx +++ b/src/pages/AccountSetting/index.tsx @@ -1,19 +1,19 @@ import React, { useState, useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; -import { ProfileEditContainer, ProfilePic, ProfilePicWrapper, Label, Row, List, ListItem } from './styles'; -import { OODDFrame } from '../../components/Frame/Frame'; -import ConfirmationModal from '../../components/ConfirmationModal'; -import { StyledText } from '../../components/Text/StyledText'; -import theme from '../../styles/theme'; -import TopBar from '../../components/TopBar'; -import back from '../../assets/arrow/left.svg'; -import imageBasic from '../../assets/default/defaultProfile.svg'; -import Profile_s from './../../assets/default/my-page.svg'; -import leave from '../../assets/default/leave.svg'; -import { getUserInfoApi } from '../../apis/user'; -import { UserInfoData } from '../../apis/user/dto'; -import Loading from '../../components/Loading'; +import { ProfileEditContainer, ProfilePic, ProfilePicWrapper, Label, Row, List, ListItem } from './styles'; +import { OODDFrame } from '@components/Frame/Frame'; +import ConfirmationModal from '@components/ConfirmationModal/index'; +import { StyledText } from '@components/Text/StyledText'; +import theme from '@styles/theme'; +import TopBar from '@components/TopBar/index'; +import back from '@assets/arrow/left.svg'; +import imageBasic from '@assets/default/defaultProfile.svg'; +import Profile_s from '@assets/default/my-page.svg'; +import leave from '@assets/default/leave.svg'; +import { getUserInfoApi } from '@apis/user'; +import type { UserInfoData } from '@apis/user/dto'; // type 명시 +import Loading from '@components/Loading/index'; const AccountSetting: React.FC = () => { const navigate = useNavigate(); @@ -81,14 +81,14 @@ const AccountSetting: React.FC = () => { @@ -98,13 +98,13 @@ const AccountSetting: React.FC = () => { 로그아웃 아이콘 - + Logout 회원 탈퇴 아이콘 - + 회원탈퇴 diff --git a/src/pages/AccountSetting/styles.tsx b/src/pages/AccountSetting/styles.tsx index cbf82ed4..964a5d1f 100644 --- a/src/pages/AccountSetting/styles.tsx +++ b/src/pages/AccountSetting/styles.tsx @@ -3,8 +3,7 @@ import styled from 'styled-components'; export const ProfileEditContainer = styled.div` margin: 0 auto; width: 100%; - flex-grow: 1; /* flexbox에서 공간을 채우도록 설정 */ - + flex-grow: 1; display: flex; flex-direction: column; align-items: center; @@ -14,18 +13,18 @@ export const ProfilePicWrapper = styled.div` display: flex; flex-direction: column; align-items: center; - margin-bottom: 1.25rem; /* 20px */ + margin-bottom: 1.25rem; margin-top: 24px; `; export const ProfilePic = styled.div` - width: 7.25rem; /* 116px */ - height: 7.25rem; /* 116px */ + width: 7.25rem; + height: 7.25rem; flex-shrink: 0; border-radius: 50%; overflow: hidden; - margin-top: 2.125rem; /* 34px */ - margin-bottom: 1.375rem; /* 22px */ + margin-top: 2.125rem; + margin-bottom: 1.375rem; img { width: 100%; @@ -61,7 +60,7 @@ export const List = styled.ul` padding: 0; margin: 0; list-style: none; - border-top: 0px solid #eee; + border-top: 0px solid ${({ theme }) => theme.colors.background.divider}; position: absolute; bottom: 20px; `; @@ -69,24 +68,24 @@ export const List = styled.ul` export const ListItem = styled.li` display: flex; align-items: center; - padding: 15px 1.25rem; /* 15px 20px */ - border-bottom: 0px solid #eee; + padding: 15px 1.25rem; + border-bottom: 0px solid ${({ theme }) => theme.colors.background.divider}; cursor: pointer; & img:first-child { - margin-right: 1rem; /* 첫 번째 이미지(왼쪽 아이콘)의 오른쪽 간격 설정 */ + margin-right: 1rem; } & img:last-child { - margin-left: auto; /* 마지막 이미지(오른쪽 화살표 아이콘)를 오른쪽으로 정렬 */ + margin-left: auto; } &:hover { - background: #f9f9f9; + background: ${({ theme }) => theme.colors.background.secondary}; } span { flex: 1; - text-align: left; /* 텍스트 왼쪽 정렬 */ + text-align: left; } `; diff --git a/src/pages/Profile/ButtonSecondary/index.tsx b/src/pages/Profile/ButtonSecondary/index.tsx index 3ce66152..93a3a04c 100644 --- a/src/pages/Profile/ButtonSecondary/index.tsx +++ b/src/pages/Profile/ButtonSecondary/index.tsx @@ -1,8 +1,8 @@ import React from 'react'; import { useNavigate } from 'react-router-dom'; import { Button } from './styles'; -import { StyledText } from '../../../components/Text/StyledText'; -import theme from '../../../styles/theme'; +import { StyledText } from '@components/Text/StyledText'; +import theme from '@styles/theme'; const ButtonSecondary: React.FC = () => { const navigate = useNavigate(); @@ -13,7 +13,7 @@ const ButtonSecondary: React.FC = () => { return ( diff --git a/src/pages/Profile/ButtonSecondary/styles.tsx b/src/pages/Profile/ButtonSecondary/styles.tsx index a7c01716..31aed05e 100644 --- a/src/pages/Profile/ButtonSecondary/styles.tsx +++ b/src/pages/Profile/ButtonSecondary/styles.tsx @@ -5,11 +5,10 @@ export const Button = styled.button` margin: 16px auto; height: 3.1rem; text-align: center; - color: #ff2389; + color: ${({ theme }) => theme.colors.brand.primary}; cursor: pointer; box-sizing: border-box; border: 1px solid; border-radius: 10px; - border-color: #ff2389; padding: 10px; `; diff --git a/src/pages/Profile/NavbarProfile/index.tsx b/src/pages/Profile/NavbarProfile/index.tsx index 8807d220..874e3780 100644 --- a/src/pages/Profile/NavbarProfile/index.tsx +++ b/src/pages/Profile/NavbarProfile/index.tsx @@ -1,14 +1,14 @@ import React from 'react'; import { Nav, IconContainer } from './styles'; import { Link } from 'react-router-dom'; -import settingIcon from "../../../assets/default/setting.svg" -import { StyledText } from '../../../components/Text/StyledText'; -import theme from '../../../styles/theme'; +import settingIcon from '@assets/default/setting.svg'; +import { StyledText } from '@components/Text/StyledText'; +import theme from '@styles/theme'; const NavbarProfile: React.FC = () => { return (