Skip to content

Commit

Permalink
Merge pull request #82 from TeamPiickle/feat/#78-Nayeon_QA
Browse files Browse the repository at this point in the history
Feat/#78 nayeon qa
  • Loading branch information
joohaem committed Jul 19, 2022
2 parents f4d04e4 + 315102e commit e955db0
Show file tree
Hide file tree
Showing 14 changed files with 78 additions and 56 deletions.
4 changes: 4 additions & 0 deletions src/asset/icon/changeProfileBtn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/asset/icon/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { ReactComponent as IcChangeProfileBtn } from "./changeProfileBtn.svg";
export { ReactComponent as IcCheck1 } from "./check1.svg";
export { ReactComponent as IcCheck2 } from "./check2.svg";
export { ReactComponent as IcCloseBtn } from "./closeBtn.svg";
Expand Down
1 change: 0 additions & 1 deletion src/components/Bookmark/MyPiickleItem/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const St = {

MyPiickleContent: styled.strong`
${({ theme }) => theme.fonts.body4};
letter-spacing: -0.03em;
color: ${({ theme }) => theme.colors.bg};
overflow: hidden;
Expand Down
3 changes: 0 additions & 3 deletions src/components/CardCollection/LoginModal/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export const St = {
ModalContents: styled.p`
width: 16.5rem;
letter-spacing: -0.03rem;
${({ theme }) => theme.fonts.body4};
color: ${({ theme }) => theme.colors.bg};
`,
Expand Down Expand Up @@ -53,7 +52,6 @@ export const St = {
box-shadow: 0rem 0.1rem 0.1rem rgba(0, 0, 0, 0.25);
border-radius: 4.7rem;
letter-spacing: -0.03rem;
${({ theme }) => theme.fonts.btn1};
color: ${({ theme }) => theme.colors.bg};
`,
Expand All @@ -73,7 +71,6 @@ export const St = {
box-shadow: 0rem 0.1rem 0.1rem rgba(0, 0, 0, 0.25);
border-radius: 4.7rem;
letter-spacing: -0.03rem;
${({ theme }) => theme.fonts.btn1};
color: ${({ theme }) => theme.colors.bg};
`,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Login/LoginForm/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const St = {
Form: styled.form``,

Title: styled.h2`
margin-bottom: 2rem;
padding: 2.4rem 0;
${({ theme }) => theme.fonts.h1};
color: ${({ theme }) => theme.colors.bg};
Expand Down
18 changes: 8 additions & 10 deletions src/components/Main/Banner/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,25 @@ export const St = {
width: 36rem;
height: 21.7rem;
`,
ContentsPages: styled.span`

ContentsPages: styled.div`
position: absolute;
right: 0;
bottom: 0;
display: flex;
flex-direction: row;
align-items: flex-start;
padding: 0.4rem 0.7rem 0.5rem;
gap: 0.3rem;
justify-content: center;
gap: 0.8rem;
width: 3.5rem;
height: 1.7rem;
width: 3.9rem;
height: 1.8rem;
background: rgba(0, 0, 0, 0.5);
`,

CurrentPage: styled.span`
line-height: 81.34%;
font-weight: 400;
font-size: 1rem;
${({ theme }) => theme.fonts.caption4};
line-height: 1.8rem;
color: ${({ theme }) => theme.colors.white};
`,
};
8 changes: 7 additions & 1 deletion src/components/Main/PiickleMe/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ export const St = {
Container: styled.section``,

RepresentVoteContentConTainer: styled.section`
position: relative;
width: 100%;
height: 15.2rem;
padding: 2.8rem 2.4rem 2rem;
padding: 2.6rem 2.4rem 2rem;
background-color: #c9f2de; //확정 아니어서 일단 노가다로 박음
`,
Expand Down Expand Up @@ -40,6 +41,7 @@ export const St = {
line-height: 1.4;
margin-bottom: 0.4rem;
padding-right: 5.8rem;
${({ theme }) => theme.fonts.body3};
color: ${({ theme }) => theme.colors.gray800};
Expand Down Expand Up @@ -79,6 +81,10 @@ export const St = {
border-radius: 4.2rem;
${({ theme }) => theme.fonts.h2}
position: absolute;
bottom: 1.8rem;
right: 1.6rem;
`,

RepresentGoVoteBtn: styled(Link)``,
Expand Down
10 changes: 9 additions & 1 deletion src/components/MyPage/MyInfo/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import { IcChangeProfileBtn } from "../../../asset/icon/index";
import useUserProfile from "../../../core/api/myPage";
import { St } from "./style";

export default function MyInfo() {
const { userProfile, isLoading, isError } = useUserProfile();

return (
<St.MyInfoContainer>
{userProfile && (
<St.Profile>
<St.ProfileImage src={userProfile.data.profile_image_url} alt="프로필이미지" />
<St.Images>
<St.ProfileImage src={userProfile.data.profile_image_url} alt="프로필" />
<St.ChangeButton>

<IcChangeProfileBtn />
</St.ChangeButton>
</St.Images>
<St.ProfileDetail>
<St.ProfileNickname>
<St.ProfileMyNickname>{userProfile.data.nickname}</St.ProfileMyNickname>
Expand Down
15 changes: 13 additions & 2 deletions src/components/MyPage/MyInfo/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,23 @@ export const St = {
height: 11.8rem;
`,

Images: styled.div`
width: 58px;
height: 58px;
position: relative;
`,

ProfileImage: styled.img`
width: 5.8rem;
height: 5.8rem;
border-radius: 50%;
background-color: pink;
`,

ChangeButton: styled.button`
position: absolute;
bottom: -0.3rem;
right: -0.3rem;
`,

ProfileDetail: styled.div``,
Expand All @@ -37,7 +50,6 @@ export const St = {
width: auto;
height: 2.6rem;
letter-spacing: -0.03em;
${({ theme }) => theme.fonts.body9};
color: ${({ theme }) => theme.colors.bg};
`,
Expand All @@ -59,7 +71,6 @@ export const St = {
`,

ProfileEmail: styled.p`
letter-spacing: -0.03rem;
${({ theme }) => theme.fonts.body4};
color: ${({ theme }) => theme.colors.gray600};
`,
Expand Down
9 changes: 3 additions & 6 deletions src/components/MyPage/MyPiickle/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const St = {
width: 7.5rem;
height: 2.2rem;
letter-spacing: -0.03rem;
${({ theme }) => theme.fonts.body1};
color: ${({ theme }) => theme.colors.gray800};
`,
Expand All @@ -49,8 +48,7 @@ export const St = {
width: auto;
height: 1.7rem;
letter-spacing: -0.03rem;
${({ theme }) => theme.fonts.body4};
${({ theme }) => theme.fonts.body6};
color: ${({ theme }) => theme.colors.gray600};
`,

Expand All @@ -69,10 +67,9 @@ export const St = {

MoveButtonTitle: styled.p`
width: auto;
height: 1.7rem;
height: 2rem;
letter-spacing: -0.03rem;
${({ theme }) => theme.fonts.body4};
${({ theme }) => theme.fonts.body6};
color: ${({ theme }) => theme.colors.bg};
`,
};
3 changes: 1 addition & 2 deletions src/components/MyPage/MySetting/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export const St = {
width: 36rem;
height: 3.9rem;
letter-spacing: -0.03rem;
${({ theme }) => theme.fonts.body6};
${({ theme }) => theme.fonts.body12};
color: ${({ theme }) => theme.colors.bg};
`,

Expand Down
2 changes: 1 addition & 1 deletion src/mocks/handlers/ballots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const ballotsHandler = [
},
{
_id: "62cc022f2e3dd7425047e382",
title: "투표 주제 제목",
title: "일이삼 사오륙 칠팔구 랄랄라 랄랄라 랄랄라라 사친깻 잎을떼 주냐남 사친깻 잎을",
},
{
_id: "62cc022f2e3dd7425047e383",
Expand Down
1 change: 0 additions & 1 deletion src/style/globalStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export const GlobalStyle = createGlobalStyle`
box-sizing: border-box;
}
html {
letter-spacing: -0.03rem;
font-family: sans-serif;
font-size: 62.5%;
user-select: none;
Expand Down
57 changes: 30 additions & 27 deletions src/style/theme.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { number } from "prop-types";

const colors = {
red: "#FF0000",
green: "#19BE7E",
Expand Down Expand Up @@ -31,45 +33,46 @@ interface Font {
weight: 300 | 400 | 500 | 600 | 700;
size: number;
lineHeight: number;
letterSpacing: number;
notoSans?: boolean;
}

function FONT({ weight, size, lineHeight, notoSans }: Font): string {
function FONT({ weight, size, lineHeight, letterSpacing, notoSans }: Font): string {
return `
font-family: ${notoSans ? "Noto Sans" : "Pretendard"};
font-weight: ${weight};
font-size: ${size}rem;
line-height: ${lineHeight}%;
letter-spacing: -0.04rem;
letter-spacing: -0.0${letterSpacing}rem;
`;
}

const fonts = {
h1: FONT({ weight: 600, size: 2, lineHeight: 130 }),
h2: FONT({ weight: 400, size: 1.2, lineHeight: 140 }),
body1: FONT({ weight: 600, size: 1.6, lineHeight: 140 }),
body2: FONT({ weight: 400, size: 2.4, lineHeight: 140 }),
body3: FONT({ weight: 700, size: 1.5, lineHeight: 140 }),
body4: FONT({ weight: 400, size: 1.2, lineHeight: 140 }),
body5: FONT({ weight: 700, size: 2.4, lineHeight: 140 }),
body6: FONT({ weight: 400, size: 1.4, lineHeight: 140 }),
body7: FONT({ weight: 500, size: 1.6, lineHeight: 140 }),
body8: FONT({ weight: 400, size: 2, lineHeight: 140, notoSans: true }),
body9: FONT({ weight: 600, size: 2, lineHeight: 130 }),
body10: FONT({ weight: 600, size: 2.4, lineHeight: 130 }),
body11: FONT({ weight: 400, size: 1.5, lineHeight: 140 }),
body12: FONT({ weight: 400, size: 1.6, lineHeight: 140 }),
caption1: FONT({ weight: 400, size: 1, lineHeight: 80 }),
caption2: FONT({ weight: 500, size: 1, lineHeight: 130 }),
caption3: FONT({ weight: 400, size: 1.2, lineHeight: 140 }),
caption4: FONT({ weight: 400, size: 1.2, lineHeight: 140 }),
caption5: FONT({ weight: 400, size: 1.1, lineHeight: 140 }),
btn1: FONT({ weight: 400, size: 1.2, lineHeight: 140 }),
btn2: FONT({ weight: 400, size: 1.4, lineHeight: 130 }),
btn3: FONT({ weight: 300, size: 1.6, lineHeight: 140 }),
btn4: FONT({ weight: 300, size: 1, lineHeight: 140 }),
footer1: FONT({ weight: 600, size: 1.2, lineHeight: 140 }),
footer2: FONT({ weight: 400, size: 1.2, lineHeight: 140 }),
h1: FONT({ weight: 600, size: 2, lineHeight: 130, letterSpacing: 4 }),
h2: FONT({ weight: 400, size: 1.2, lineHeight: 140, letterSpacing: 4 }),
body1: FONT({ weight: 600, size: 1.6, lineHeight: 140, letterSpacing: 3 }),
body2: FONT({ weight: 400, size: 2.4, lineHeight: 140, letterSpacing: 4 }),
body3: FONT({ weight: 700, size: 1.5, lineHeight: 140, letterSpacing: 3 }),
body4: FONT({ weight: 400, size: 1.2, lineHeight: 140, letterSpacing: 3 }),
body5: FONT({ weight: 700, size: 2.4, lineHeight: 140, letterSpacing: 4 }),
body6: FONT({ weight: 400, size: 1.4, lineHeight: 140, letterSpacing: 3 }),
body7: FONT({ weight: 500, size: 1.6, lineHeight: 140, letterSpacing: 4 }),
body8: FONT({ weight: 400, size: 2, lineHeight: 140, letterSpacing: 4, notoSans: true }),
body9: FONT({ weight: 600, size: 2, lineHeight: 130, letterSpacing: 3 }),
body10: FONT({ weight: 600, size: 2.4, lineHeight: 130, letterSpacing: 4 }),
body11: FONT({ weight: 400, size: 1.5, lineHeight: 140, letterSpacing: 4 }),
body12: FONT({ weight: 400, size: 1.6, lineHeight: 140, letterSpacing: 4 }),
caption1: FONT({ weight: 400, size: 1, lineHeight: 80, letterSpacing: 4 }),
caption2: FONT({ weight: 500, size: 1, lineHeight: 130, letterSpacing: 4 }),
caption3: FONT({ weight: 400, size: 1.2, lineHeight: 140, letterSpacing: 4 }),
caption4: FONT({ weight: 400, size: 1.2, lineHeight: 140, letterSpacing: 3 }),
caption5: FONT({ weight: 400, size: 1.1, lineHeight: 140, letterSpacing: 4 }),
btn1: FONT({ weight: 400, size: 1.2, lineHeight: 140, letterSpacing: 3 }),
btn2: FONT({ weight: 400, size: 1.4, lineHeight: 130, letterSpacing: 4 }),
btn3: FONT({ weight: 300, size: 1.6, lineHeight: 140, letterSpacing: 4 }),
btn4: FONT({ weight: 300, size: 1, lineHeight: 140, letterSpacing: 4 }),
footer1: FONT({ weight: 600, size: 1.2, lineHeight: 140, letterSpacing: 4 }),
footer2: FONT({ weight: 400, size: 1.2, lineHeight: 140, letterSpacing: 4 }),
} as const;

const theme = {
Expand Down

0 comments on commit e955db0

Please sign in to comment.