Skip to content

Commit

Permalink
Feat: 마이페이지 설정으로 이름 변경 및 font, theme ver3.0 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
seoyoung-min committed Oct 27, 2024
1 parent a083ac0 commit 5ecc47d
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 29 deletions.
25 changes: 13 additions & 12 deletions src/app/account/_components/LanguageDropdown.css.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { style } from '@vanilla-extract/css';
import { vars } from '@/styles/__theme.css';
import * as fonts from '@/styles/__font.css';
import { vars } from '@/styles/theme.css';
import * as fonts from '@/styles/font.css';

export const container = style({
position: 'relative',
});

export const triggerDiv = style([
fonts.labelMedium,
fonts.LabelSmall,
{
width: 172,
height: 36,
Expand All @@ -17,37 +17,38 @@ export const triggerDiv = style([
alignItems: 'center',
justifyContent: 'space-between',

color: vars.color.gray9,
color: vars.color.black,

border: `2px solid ${vars.color.gray7}`,
border: `2px solid ${vars.color.bluegray8}`,
borderRadius: 8,
},
]);

export const menuDiv = style([
fonts.labelMedium,
fonts.LabelSmall,
{
width: 172,
padding: '8px 0',

position: 'absolute',

color: vars.color.gray9,
color: vars.color.black,

border: `2px solid ${vars.color.gray7}`,
border: `2px solid ${vars.color.bluegray8}`,
borderTop: 'none',
borderRadius: '0px 0px 8px 8px',
borderRadius: '0.8rem',
backgroundColor: vars.color.bggray,
},
]);

export const listDiv = style([
fonts.labelMedium,
fonts.LabelSmall,
{
padding: '8px 16px',
borderRadius: '0.8rem',

selectors: {
'&:hover': {
backgroundColor: vars.color.lightblue,
backgroundColor: vars.color.bluegray6,
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/app/account/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const accountLocale = {
introduceError: '소개 에러',
profileSetting: '프로필 설정',
save: '저장',
myPage: '마이페이지',
settings: '설정',
changeLanguage: '언어변경',
language: '언어',
contact: '문의하기',
Expand Down Expand Up @@ -50,7 +50,7 @@ export const accountLocale = {
profileSetting: 'Profile Settings',
save: 'Save',

myPage: 'My Page',
settings: 'Settings',
changeLanguage: 'Change language',
language: 'Language',
contact: 'Contact us',
Expand Down
9 changes: 5 additions & 4 deletions src/app/account/page.css.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { style } from '@vanilla-extract/css';
import * as fonts from '@/styles/__font.css';
import { vars } from '@/styles/__theme.css';
import * as fonts from '@/styles/font.css';
import { vars } from '@/styles/theme.css';

export const container = style({
marginTop: 18,
Expand All @@ -11,7 +11,7 @@ export const container = style({
});

export const baseDiv = style([
fonts.titleSmall,
fonts.Label,
{
padding: '16px 32px',

Expand All @@ -25,10 +25,11 @@ export const buttonDiv = style([
baseDiv,
{
cursor: 'pointer',
borderRadius: '1.2rem',

selectors: {
'&:hover': {
backgroundColor: vars.color.lightblue,
backgroundColor: vars.color.bluegray6,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/app/account/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function AccountPage() {
leftClick={() => {
router.back();
}}
title={accountLocale[language].myPage}
title={accountLocale[language].settings}
/>
<section className={styles.container}>
<div className={styles.buttonDiv} onClick={onClickMoveToPage('account/profile')} role="button">
Expand Down
4 changes: 2 additions & 2 deletions src/app/layout.css.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { vars } from '@/styles/__theme.css';
import { vars } from '@/styles/theme.css';
import * as fonts from '@/styles/__font.css';
import { style } from '@vanilla-extract/css';

Expand All @@ -10,7 +10,7 @@ export const body = style({

position: 'relative',

backgroundColor: vars.color.white,
backgroundColor: vars.color.bggray,
});

export const toastContainer = style([fonts.labelMedium]);
13 changes: 6 additions & 7 deletions src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
'use client';
import { ReactNode } from 'react';

import CloseButton from '/public/icons/close_button.svg';
import BackIcon from '/public/icons/back.svg';

import * as styles from './Header.css';
import { commonLocale } from '@/components/locale';
import { useLanguage } from '@/store/useLanguage';

//TODO: left의 close 없애야함.
interface HeaderProps {
title: string;
left?: 'close' | 'back';
left?: 'cancel' | 'back' | 'close';
leftClick?: () => void;
right?: ReactNode;
}
Expand All @@ -20,14 +18,15 @@ function Header({ title, left, leftClick, right }: HeaderProps) {
return (
<div className={styles.header}>
<button className={`${styles.flexChild} ${styles.leftChild}`} type="button" onClick={leftClick}>
{left === 'close' && <CloseButton width={'24'} height={'24'} alt={commonLocale[language].closeButton} />}
{left === 'back' && <BackIcon width={'8'} height={'14'} alt={commonLocale[language].goBack} />}
{left === 'cancel' && <p>{commonLocale[language].cancel}</p>}
{left === 'back' && <p>{commonLocale[language].back}</p>}
{left === 'close' && <p>"닫기"</p>}
{left === null && <></>}
</button>

<h1 className={`${styles.headerTitle} ${styles.flexChild}`}>{title}</h1>

<div className={`${styles.flexChild} ${styles.rightChild}`}>{right}</div>
{right === null ? <></> : <div className={`${styles.flexChild} ${styles.rightChild}`}>{right}</div>}
</div>
);
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const commonLocale: Record<string, { [key: string]: string }> = {
make: '를 만들어보세요!',
start: '시작하기',
cancel: '취소',
back: '뒤로가기',
noDataImage: '데이터 없을 때 이미지',
imageDescription: '이미지 설명',
notSupportedPlatform: '지원하지 않는 플랫폼입니다.',
Expand Down Expand Up @@ -65,7 +66,8 @@ export const commonLocale: Record<string, { [key: string]: string }> = {
list: 'your own',
make: 'list!',
start: 'Getting started',
cancel: 'cancel',
cancel: 'Cancel',
back: 'Back',
noDataImage: 'Image displayed when there is no data',
imageDescription: 'Image description',
notSupportedPlatform: 'This platform is not supported.',
Expand Down

0 comments on commit 5ecc47d

Please sign in to comment.