Skip to content

Commit 99cf43d

Browse files
committed
Refactor: 모달 및 내브바 컬러시스템 적용
1 parent f3f33a1 commit 99cf43d

3 files changed

Lines changed: 14 additions & 15 deletions

File tree

src/components/Modal/styles.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const ModalContainer = styled.div<{ $isCloseButtonVisible: boolean }>`
2626
max-height: 30%;
2727
padding: 2rem 1.5rem 1.5rem 1.5rem;
2828
${({ $isCloseButtonVisible }) => ($isCloseButtonVisible ? 'padding-top: 2.5rem' : '')};
29-
background-color: ${({ theme }) => theme.colors.white};
29+
background-color: ${({ theme }) => theme.colors.background.primary};
3030
border-radius: 0.625rem;
3131
box-shadow: 0 -0.125rem 0.625rem rgba(0, 0, 0, 0.1);
3232
z-index: 999;
@@ -49,7 +49,7 @@ export const ConfirmButton = styled.button`
4949
padding: 0.625rem 0.875rem;
5050
justify-content: center;
5151
align-items: center;
52-
background: ${({ theme }) => theme.colors.gradient};
52+
background: ${({ theme }) => theme.colors.brand.gradient};
5353
border-radius: 0.5rem;
5454
color: white;
5555
${({ theme }) => theme.fontStyles['body1-medium']}

src/components/NavBar/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { StyledText } from '@components/Text/StyledText';
2222
import Modal from '@components/Modal';
2323
import type { ModalProps } from '@components/Modal/dto';
2424
import { getCurrentUserId } from '@utils/getCurrentUserId';
25+
import theme from '@styles/theme';
2526

2627
const NavBar: React.FC = () => {
2728
const [isLogoutModalOpen, setIsLogoutModalOpen] = useState(false);
@@ -120,7 +121,7 @@ const NavBar: React.FC = () => {
120121
<StyledText
121122
className="styled-text"
122123
$textTheme={{ style: selectedTab === tab.name ? `heading2-bold` : 'heading2-medium' }}
123-
color="#1d1d1d"
124+
color={theme.colors.text.primary}
124125
>
125126
{tab.name}
126127
</StyledText>

src/components/NavBar/styles.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
import styled from 'styled-components';
22

33
export const NavBarContainer = styled.nav`
4-
// fixed 포지션에 breakPoint를 적용하는 방법
54
position: fixed;
6-
${({ theme }) => theme.visibleOnMobileTablet}; // breakPoint 미디어쿼리
7-
bottom: 0; // 경우에 따라 top 0 등으로 작성
8-
left: 50%; // 수직 중앙에 위치
9-
transform: translateX(-50%); // width에 따른 수직 중앙 조정
10-
width: 100%; // brakePoint에 따른 width에 따르도록 설정
5+
${({ theme }) => theme.visibleOnMobileTablet};
6+
bottom: 0;
7+
left: 50%;
8+
transform: translateX(-50%);
9+
width: 100%;
1110
12-
// 이후로 자기 코드에 맞춰서 작성
1311
height: 5.5rem;
1412
justify-content: center;
1513
align-items: center;
16-
background: ${({ theme }) => theme.colors.gradient}; // 여기서 그래디언트 색상 사용
14+
background: ${({ theme }) => theme.colors.brand.gradient};
1715
margin: 0;
1816
border-radius: 1.25rem 1.25rem 0 0;
1917
filter: drop-shadow(0rem 0rem 0.25rem rgba(0, 0, 0, 0.25));
@@ -66,7 +64,7 @@ export const SideNavBarContainer = styled.nav`
6664
padding: 2.5rem 1.5rem;
6765
border-radius: 0 3rem 3rem 0;
6866
position: fixed;
69-
background: white;
67+
background: ${({ theme }) => theme.colors.background.primary};
7068
filter: drop-shadow(0rem 0rem 0.25rem rgba(0, 0, 0, 0.25));
7169
`;
7270

@@ -90,7 +88,7 @@ export const SideNavBarHeader = styled.header`
9088
}
9189
9290
button:hover {
93-
background: rgba(0, 0, 0, 0.1);
91+
background: ${({ theme }) => theme.colors.gray[200]};
9492
}
9593
`;
9694

@@ -110,7 +108,7 @@ export const SideNavBarButton = styled.label`
110108
align-items: center;
111109
border-radius: 50%;
112110
padding: 0.6rem;
113-
background: white;
111+
background: ${({ theme }) => theme.colors.background.primary};
114112
transition: background 0.2s;
115113
116114
box-shadow:
@@ -120,7 +118,7 @@ export const SideNavBarButton = styled.label`
120118
}
121119
122120
button:hover {
123-
background: rgba(0, 0, 0, 0.1);
121+
background: ${({ theme }) => theme.colors.gray[200]};
124122
}
125123
126124
img {

0 commit comments

Comments
 (0)