Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[토너먼트] 토너먼트 플로우 화면 퍼블리싱 #72

Merged
merged 29 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6fccf07
feat: 토너먼트 공통 버튼 도입
imeureka Jan 10, 2024
f8ee2a1
docs: 토너먼트 컨테이너 폴더변경
imeureka Jan 10, 2024
eaaac41
Merge branch 'develop' into refactor/#64-tournament-intro
imeureka Jan 10, 2024
319480a
style: 토너먼트 패딩 값 변경
imeureka Jan 10, 2024
09eb47b
Merge branch 'develop' into refactor/#64-tournament-intro
imeureka Jan 10, 2024
3a7ec58
feat: 공통 컴포넌트 시작하기 버튼 구현
imeureka Jan 10, 2024
d539d1e
feat: 시작하기 버튼 후 라운드 시작 로직 구현!
imeureka Jan 10, 2024
9217f49
chore: 네이밍 오타 수정
imeureka Jan 10, 2024
14a1175
style: 스타일 코드 분리
imeureka Jan 10, 2024
d19f23a
feat: btn_next - border 지우기
imeureka Jan 10, 2024
dbcbd10
style: theme 토너먼트 폰트 추가
imeureka Jan 10, 2024
c8a2b66
docs: 폴더 이동
imeureka Jan 10, 2024
3aa243f
style: 토너먼트 카드 스타일 분리
imeureka Jan 10, 2024
a22ef19
style: 토너먼트 카드 스타일 분리
imeureka Jan 10, 2024
8b8865f
style: 스타일 속성 순서
imeureka Jan 10, 2024
a78fcf3
feat: 토너먼트 footer 컴포넌트 구현
imeureka Jan 10, 2024
331544c
feat: 토너먼트 title 컴포넌트 구현
imeureka Jan 10, 2024
a6ee2d2
style: 폴더 구조 이동
imeureka Jan 10, 2024
0afd138
chore: 아이콘 이미지 추가
imeureka Jan 10, 2024
73a4ef9
chore: 아이콘 추가
imeureka Jan 10, 2024
eca41f8
feat: 토너먼트 불필요한 div 삭제
imeureka Jan 10, 2024
3fa715b
feat: 더보기 아이콘 추가 링크
imeureka Jan 10, 2024
12ff9d0
style: 이전 버튼 패딩 값 조절
imeureka Jan 10, 2024
bd7a06f
feat: 새로고침 아이콘 추가
imeureka Jan 10, 2024
adf5bc1
feat: header 임시 높이 조정
imeureka Jan 11, 2024
3e93d61
fix: 빌드 오류 아이콘 수정
imeureka Jan 11, 2024
e7ac4dc
style: 가운데 정렬
imeureka Jan 12, 2024
6569d7e
style: rem 폰트 변경
imeureka Jan 12, 2024
6c2af77
Merge branch 'develop' into feat/#63-tournament-rounding-layout
imeureka Jan 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions public/svg/ic_external_gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions public/svg/ic_refresh_gray.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/assets/svg/IcExternalGray.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { SVGProps } from 'react';
const SvgIcExternalGray = (props: SVGProps<SVGSVGElement>) => (
<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16' {...props}>
<path
stroke='#ACA7A9'
strokeLinecap='round'
strokeLinejoin='round'
d='M7.25 2h-3A2.25 2.25 0 0 0 2 4.25v7.5A2.25 2.25 0 0 0 4.25 14h7.5A2.25 2.25 0 0 0 14 11.75v-3M10.25 2H14m0 0v3.375M14 2 7.624 8.375'
/>
</svg>
);
export default SvgIcExternalGray;
13 changes: 13 additions & 0 deletions src/assets/svg/IcRefreshGray.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { SVGProps } from 'react';
const SvgIcRefreshGray = (props: SVGProps<SVGSVGElement>) => (
<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' {...props}>
<path
stroke='#ACA7A9'
strokeLinecap='round'
strokeLinejoin='round'
strokeWidth={1.5}
d='M18.869 16a8.01 8.01 0 0 1-6.94 4 8.01 8.01 0 0 1-7.428-5m11.494 0H20v4M5.073 8a8.01 8.01 0 0 1 6.939-4 8.01 8.01 0 0 1 7.428 5M8.005 9H4V5'
/>
</svg>
);
export default SvgIcRefreshGray;
4 changes: 3 additions & 1 deletion src/assets/svg/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export { default as IcDown } from './IcDown';
export { default as IcEdit2 } from './IcEdit2';
export { default as IcEdit } from './IcEdit';
export { default as IcExternal } from './IcExternal';
export { default as IcExternalGray } from './IcExternalGray';
export { default as IcGift } from './IcGift';
export { default as IcGroup } from './IcGroup';
export { default as IcImg } from './IcImg';
Expand All @@ -30,13 +31,14 @@ export { default as IcPlus } from './IcPlus';
export { default as IcPlusImage } from './IcPlusImage';
export { default as IcPlusImageFinal } from './IcPlusImageFinal';
export { default as IcRefresh } from './IcRefresh';
export { default as IcRefreshGray } from './IcRefreshGray';
export { default as IcRight } from './IcRight';
export { default as IcSettings } from './IcSettings';
export { default as IcUnselectedCalender } from './IcUnselectedCalender';
export { default as IcUnselectedClock } from './IcUnselectedClock';
export { default as IcUp } from './IcUp';
export { default as IcUser } from './IcUser';
export { default as Logotype } from './Logotype';
export { default as Logo } from './Logo';
export { default as LogoSweet } from './LogoSweet';
export { default as Logotype } from './Logotype';
export { default as Vite } from './Vite';
3 changes: 2 additions & 1 deletion src/components/common/Button/Next/BtnNext.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export const Wrapper = styled.button`

background-color: ${({ theme: { colors } }) => colors.G_02};
color: ${({ theme: { colors } }) => colors.G_07};
border-color: ${({ theme: { colors } }) => colors.G_07};
border: none;
/* border-color: ${({ theme: { colors } }) => colors.G_07}; */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

주석 지워볼까용!!


${({ theme: { fonts } }) => fonts.body_09}

Expand Down
7 changes: 6 additions & 1 deletion src/components/common/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import styled from 'styled-components';

function Header() {
return <div>Header</div>;
return <HeaderWrapper>Header</HeaderWrapper>;
}

export default Header;
const HeaderWrapper = styled.div`
height: 5.6rem;
`;
4 changes: 4 additions & 0 deletions src/components/tournament/intro/TournamentContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import * as S from './TournamentContatiner.style';
import { Svg3Dicons } from '../../../assets/svg';
import TournamentStartButton from './tournamentStartButton/TournamentStartButton';
import { useState } from 'react';

import TournamentFlowContainer from '../TournamentFlowContainer';

const TournamentContainer = () => {

const [showTournamentContainer, setShowTournamentContainer] = useState(true);

const handleStartClick = () => {
Expand All @@ -28,6 +30,8 @@ const TournamentContainer = () => {
{!showTournamentContainer && <TournamentFlowContainer />}
</>
);

};

export default TournamentContainer;

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import styled from 'styled-components';

export const TournamentCardWrapper = styled.div`
display: flex;
justify-content: center;
gap: 1.5rem;
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import TournamentCard from './TournamentCard/TournamentCard';
import TournamentFooter from './tournamentFooter/TournamentFooter';
import TournamentTitle from './tournamentTitle/TournamentTitle';
import { TournamentCardWrapper } from './TournamentFlowContainer.style';

const TournamentFlowContainer = () => {
return (
<>
<TournamentTitle />
<TournamentCardWrapper>
<TournamentCard /> <TournamentCard />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 화면에서 TournamenCard가 반복되면, map을 사용하는 것도 좋을 거 같아요 !! 하지만 이 부분은 추후 로직 구현할때 함께 생각해보면 좋을 거 같아서 미리 리뷰 남겨봅니다 ; )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗 당연하죵 ㅎㅎ!!! 감사합니당

</TournamentCardWrapper>
<TournamentFooter />
</>
);
};

export default TournamentFlowContainer;
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,39 @@ import styled from 'styled-components';
interface TournamentCardWrapperProps {
isClicked: boolean;
}
export const Wrapper = styled.div``;
export const LinkIconWrapper = styled.button`
${({ theme: { mixin } }) => mixin.inlineFlexBox({ align: 'center', justify: 'center' })}

position: relative;
left: 50%;
transform: translateX(-50%);
width: 9.9rem;
border: none;
background-color: ${({ theme }) => theme.colors.white};
`;

export const SelectWrapper = styled.div<{ isClicked: boolean }>`
display: ${({ isClicked }) => (isClicked ? 'flex' : 'none')};
width: 5rem;
justify-content: center;
align-items: center;
position: absolute;

width: 5rem;
top: -12%;
left: 50%;
justify-content: center;
align-items: center;
transform: translateX(-50%);
`;

export const TournamentCardWrapper = styled.div<TournamentCardWrapperProps>`
display: flex;
flex-direction: column;
width: 16rem;
position: relative;
border-radius: 12px;

width: 16rem;
border: ${({ isClicked }) =>
isClicked ? '3px solid var(--Pink-P-06, #FF2176)' : '3px solid var(--Gray-G-02, #ebe9ea)'};
border-radius: 12px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기 rem으로 고치면 좋을 것 같아요~!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반응형 border 고려해서 border-radius는 px 컨벤션 가져가도 좋을 것 같아요!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추후에 같이 얘기해보져 여러분!

background: ${({ theme }) => theme.colors.white};
cursor: pointer;

Expand All @@ -44,6 +57,8 @@ export const Title = styled.p`

export const Price = styled.p`
margin-bottom: 1.2rem;
${({ theme }) => theme.fonts.caption_02};
color: ${({ theme }) => theme.colors.G_09};
`;

export const TournamentImgWrapper = styled.div`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import exampleItemImg from '../../../../assets/img/Rectangle.png';
import * as S from './TournamentCard.style';
import { Logo } from '../../../../assets/svg';
import { IcExternalGray, IcRefreshGray, Logo } from '../../../../assets/svg';

const TournamentCard = () => {
const [isClicked, setIsClicked] = useState(false);
Expand All @@ -15,7 +15,7 @@ const TournamentCard = () => {
};

return (
<>
<S.Wrapper>
<S.TournamentCardWrapper isClicked={isClicked} onClick={handleClick}>
<S.SelectWrapper isClicked={isClicked}>
<Logo />
Expand All @@ -25,16 +25,18 @@ const TournamentCard = () => {
</S.TournamentImgWrapper>

<S.ItemInfo>
<S.Title>임영웅 콘서트 Gold열</S.Title>
<S.Title>CHANEL 22 MINI 핸드백</S.Title>
<S.Price>{formatPrice(8130000)}원</S.Price>
{/* 보러가기 컴포넌트 분리할까 말까 링크있는
아이템이면 생성 조건 렌더링 */}
</S.ItemInfo>
</S.TournamentCardWrapper>
</>
<S.LinkIconWrapper>
<IcExternalGray style={{ width: '1.6rem' }} />
더보기
</S.LinkIconWrapper>
</S.Wrapper>
);
};

export default TournamentCard;


Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import styled from 'styled-components';

export const TournamentFooterWrapper = styled.footer`
display: flex;
justify-content: space-between;
position: absolute;
align-items: center;

width: 37.5rem;
bottom: 0;
padding: 2rem;
left: 50%;
transform: translate(-50%);
`;

export const Btnpre = styled.button`
${({ theme: { mixin } }) => mixin.inlineFlexBox({ align: 'center', justify: 'center' })}

height: 4.4rem;
padding: 1rem 1.1rem 1rem 0rem;

border: none;
border-radius: 9.9rem;
background-color: ${({ theme }) => theme.colors.white};
`;
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
import { IcLeft } from '../../../../assets/svg';
import BtnNext from '../../../common/Button/Next/BtnNext';
import * as S from './TournamentFooter.style';

const TournamentFooter = () => {
return (
<div>
<></>
</div>
<>
<S.TournamentFooterWrapper>
<S.Btnpre>
<IcLeft style={{ width: '2.4rem', height: '2.4rem' }} />
이전
</S.Btnpre>
<BtnNext>다음</BtnNext>
</S.TournamentFooterWrapper>
</>
);
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
import { IcRefreshGray } from '../../../../assets/svg';
import * as S from './TournamernTitle.style';

const TournamentTitle = () => {
return <div></div>;
const round = 1;
return (
<>
{/* 라운드 컴포넌트 */}
<S.Title>Round {round}</S.Title>
<S.SetCount>1/6</S.SetCount>
{/* 세트 수 현재 상황 */}
<S.RefreshWrapper>
<IcRefreshGray />
</S.RefreshWrapper>
</>
);
};

export default TournamentTitle;
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import styled from 'styled-components';

export const Title = styled.p`
${({ theme }) => theme.fonts.suit};
font-size: 3.4rem;
color: ${({ theme }) => theme.colors.P_06};
`;

export const SetCount = styled.p`
margin-bottom: 4rem;
font-size: 1.8rem;
color: ${({ theme }) => theme.colors.G_05};
${({ theme }) => theme.fonts.body_02};
`;

export const RefreshWrapper = styled.div`
display: flex;
justify-content: flex-end;

width: 2.4rem;
`;
2 changes: 2 additions & 0 deletions src/pages/TournamentOngoing.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

import TournamentFlowContainer from '../components/tournament/TournamentFlowContainer';


const TournamentOngoing = () => {
return (
<>
Expand Down
7 changes: 7 additions & 0 deletions src/style/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ const fonts = {
font-weight: 400;
line-height: 150%;
`,
suit: css`
font-family: 'SUIT';
font-size: 1rem;
font-style: normal;
font-weight: 700;
line-height: 150%;
`,
};

const theme = { mixin, colors, fonts };
Expand Down
Loading