Skip to content

Commit b04aa20

Browse files
authored
Merge pull request #120 from oodd-team/feat/OD-171
[OD-171] Login, SignUp, TermsAgreement 페이지와 담당 공통 컴포넌트에 컬러시스템 적용
2 parents 412b83d + 31444c9 commit b04aa20

10 files changed

Lines changed: 27 additions & 33 deletions

File tree

src/components/PostItem/index.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ import theme from '@styles/theme';
55
import PinIcon from '@assets/default/pin.svg';
66
import Like from '@components/Icons/Like';
77
import Message from '@components/Icons/Message';
8+
import { StyledText } from '@components/Text/StyledText';
89

910
import type { PostItemProps } from './dto';
10-
import { PostItemLayout, PostImageContainer, PostImage, LikesCountStyledText, LikesOverlay, Pin } from './style';
11+
import { PostItemLayout, PostImageContainer, PostImage, LikesOverlay, Pin } from './style';
1112

1213
const PostItem: React.FC<PostItemProps> = ({ post }) => {
1314
const navigate = useNavigate();
@@ -25,13 +26,13 @@ const PostItem: React.FC<PostItemProps> = ({ post }) => {
2526
{post.isRepresentative && <Pin src={PinIcon} />}
2627
<LikesOverlay>
2728
<Like />
28-
<LikesCountStyledText $textTheme={{ style: 'caption1-regular' }} color={theme.colors.gray3}>
29+
<StyledText $textTheme={{ style: 'caption1-regular' }} color={theme.colors.text.tertiary}>
2930
{post.postLikesCount}
30-
</LikesCountStyledText>
31-
<Message />
32-
<LikesCountStyledText $textTheme={{ style: 'caption1-regular' }} color={theme.colors.gray3}>
31+
</StyledText>
32+
<Message color="#8E8E8E" />
33+
<StyledText $textTheme={{ style: 'caption1-regular' }} color={theme.colors.text.tertiary}>
3334
{post.postCommentsCount}
34-
</LikesCountStyledText>
35+
</StyledText>
3536
</LikesOverlay>
3637
</PostImageContainer>
3738
</PostItemLayout>

src/components/PostItem/style.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import styled from 'styled-components';
2-
import { StyledText } from '@components/Text/StyledText';
32

43
export const PostItemLayout = styled.article`
54
flex: 1 1 calc(50% - 0.5rem); /* 기본적으로 두 개씩 배치되도록 설정 */
@@ -43,20 +42,14 @@ export const PostImage = styled.img`
4342

4443
export const LikesOverlay = styled.div`
4544
position: absolute;
46-
bottom: 0; /* 하단에 배치 */
45+
bottom: 0.625rem; /* 하단에 배치 */
46+
right: 0.625rem;
4747
width: 100%;
4848
display: flex;
49-
align-items: center;
5049
justify-content: flex-end;
50+
align-items: center;
5151
box-sizing: border-box;
52-
`;
53-
54-
export const Icon = styled.img`
55-
margin-bottom: 0.5rem;
56-
`;
57-
58-
export const LikesCountStyledText = styled(StyledText)`
59-
margin: 0 8px 0.5rem 4px;
52+
gap: 5px;
6053
`;
6154

6255
export const Pin = styled.img`

src/components/TopBar/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const TopBar: React.FC<TopBarProps> = ({
3030
>
3131
<img src={LeftButtonSrc || ''} alt="뒤로가기" />
3232
</LeftButton>
33-
<StyledTextWrapper $textTheme={{ style: 'body1-bold' }} color={theme.colors.black}>
33+
<StyledTextWrapper $textTheme={{ style: 'heading1-bold' }} color={theme.colors.text.primary}>
3434
{text}
3535
</StyledTextWrapper>
3636
<RightButton

src/components/TopBar/styles.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import styled from 'styled-components';
2+
import theme from '@styles/theme';
23
import { StyledText } from '@components/Text/StyledText';
34
import type { TopBarLayoutProps } from './dto';
4-
55
export const TopBarLayout = styled.header<TopBarLayoutProps>`
66
display: flex;
77
position: sticky;
88
top: 0; /* 부모 요소의 상단에 붙도록 설정 */
99
z-index: 99;
10-
background-color: white;
10+
background-color: ${theme.colors.background.primary};
1111
width: 100%; /* 부모 너비에 맞춤 */
1212
align-items: center;
1313
padding: 0.5rem 1.25rem;
1414
${({ $withBorder, theme }) =>
1515
$withBorder &&
1616
`
17-
border-bottom: solid 0.0625rem ${theme.colors.gray2};
17+
border-bottom: solid 0.0625rem ${theme.colors.border.divider};
1818
`}
1919
`;
2020

src/components/UserProfile/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const UserProfile: React.FC<UserProfileProps> = React.memo(({ userImg, bio = '',
1313
<UserImg src={userImg} alt={`${nickname}'s profile`} />
1414
<UserDetailsContainer>
1515
<StyledText $textTheme={{ style: 'headline2-bold' }}>{nickname}</StyledText>
16-
<StyledBio $textTheme={{ style: 'body2-regular' }} color={theme.colors.gray3}>
16+
<StyledBio $textTheme={{ style: 'body2-regular' }} color={theme.colors.text.tertiary}>
1717
{truncatedBio}
1818
</StyledBio>
1919
</UserDetailsContainer>

src/pages/Login/SocialLoginButton/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const SocialLoginButton: React.FC<SocialLoginProps> = ({ bgColor, logoSrc, altTe
2727
</LogoImgWrapper>
2828
<StyledTextWrapper
2929
$textTheme={{ style: 'body2-bold' }}
30-
color={provider === 'kakao' ? theme.colors.black : theme.colors.white}
30+
color={provider === 'kakao' ? theme.colors.text.primary : theme.colors.text.contrast}
3131
>
3232
{buttonText}
3333
</StyledTextWrapper>

src/pages/Login/SocialLoginButton/style.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import styled from 'styled-components';
22
import { StyledText } from '@components/Text/StyledText';
33

4-
export const SocialLoginContainer = styled.button<{ $bgColor: string; $border?: boolean }>`
4+
export const SocialLoginContainer = styled.button<{ $bgColor: string }>`
55
display: flex;
66
align-items: center;
77
width: calc(100% - 3.5rem);
88
max-width: 40rem;
99
height: 3.5rem;
1010
background-color: ${({ $bgColor }) => $bgColor};
1111
border-radius: 0.5rem;
12-
border: ${({ $border }) => ($border ? '1px solid #000' : 'none')};
1312
cursor: pointer;
1413
margin-bottom: 0.5rem;
1514
box-sizing: border-box;
@@ -28,10 +27,10 @@ export const LogoImage = styled.img`
2827
max-height: 100%;
2928
`;
3029

31-
export const StyledTextWrapper = styled(StyledText)<{ $left?: string }>`
30+
export const StyledTextWrapper = styled(StyledText)`
3231
display: flex;
3332
width: 12.5rem;
34-
padding-left: ${({ $left }) => $left || '1.2rem'};
33+
padding-left: 1.2rem;
3534
align-items: center;
3635
margin: 0 auto;
3736
`;

src/pages/Login/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const Login: React.FC = () => {
1414
return (
1515
<OODDFrame>
1616
<LoginContainer>
17-
<StyledWelcomeWrapper $textTheme={{ style: 'title2-bold' }} color={theme.colors.black}>
17+
<StyledWelcomeWrapper $textTheme={{ style: 'title2-bold' }} color={theme.colors.text.primary}>
1818
{'반가워요! \n계정을 선택해주세요.'}
1919
</StyledWelcomeWrapper>
2020
<SocialLoginButton

src/pages/SignUp/style.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const InputContainer = styled.section`
5555

5656
export const InputValue = styled.input`
5757
width: 100%;
58-
max-width: 300px;
58+
max-width: 18.75rem;
5959
height: 3.25rem;
6060
font-family: Pretendard;
6161
font-size: 2.5rem;

src/pages/TermsAgreement/styles.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import styled from 'styled-components';
22
import { StyledText } from '@components/Text/StyledText';
3+
import theme from '@styles/theme';
34

45
export const TermsAgreementLayout = styled.main`
56
display: flex;
@@ -29,12 +30,12 @@ export const CheckboxInput = styled.input`
2930
appearance: none; /* 기본 스타일 제거 */
3031
width: 1.25rem;
3132
height: 1.25rem;
32-
border: 0.125rem solid #e0e0e0;
33+
border: 0.125rem solid ${theme.colors.border.divider};
3334
border-radius: 0.25rem;
3435
position: relative;
3536
&:checked {
36-
background-color: #ffbbda;
37-
border-color: #ff2389;
37+
background-color: ${theme.colors.brand.primaryLighter};
38+
border-color: ${theme.colors.brand.primary};
3839
}
3940
&:checked::after {
4041
content: '✓';
@@ -49,7 +50,7 @@ export const CheckboxInput = styled.input`
4950

5051
export const Divider = styled.hr`
5152
border: none;
52-
border-top: 0.0625rem solid #e0e0e0;
53+
border-top: 0.0625rem solid ${theme.colors.border.divider};
5354
margin: 0.625rem 0;
5455
`;
5556

0 commit comments

Comments
 (0)