Skip to content

Commit

Permalink
style: 스타일 코드 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
imeureka committed Jan 10, 2024
1 parent 9217f49 commit 14a1175
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
12 changes: 3 additions & 9 deletions src/components/tournament/intro/TournamentContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import TournamentStartText from './tournamentStartText/TournamentStartText';
import TournamentItemCount from './tournamentItemCount/TournamentItemCount';
import styled from 'styled-components';
import * as S from './TournamentContatiner.style';
import { Svg3Dicons } from '../../../assets/svg';
import TournamentStartButton from './tournamentStartButton/TournamentStartButton';
import { useState } from 'react';
Expand All @@ -18,9 +18,9 @@ export default function TournamentContainer() {
<>
<TournamentStartText />
<TournamentItemCount />
<TournamentImg>
<S.TournamentImg>
<Svg3Dicons />
</TournamentImg>
</S.TournamentImg>
<TournamentStartButton onClick={handleStartClick} />
</>
)}
Expand All @@ -29,9 +29,3 @@ export default function TournamentContainer() {
</>
);
}

const TournamentImg = styled.div`
width: 20rem;
height: 20rem;
margin: 0 auto;
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import styled from "styled-components";

export const TournamentImg = styled.div`
width: 20rem;
height: 20rem;
margin: 0 auto;
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import styled from 'styled-components';

export const TournamentStartButtonWrapper = styled.div`
position: absolute;
margin-bottom: 2rem;
bottom: 0;
`;
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
import React from 'react';
import BtnFill from '../../../common/Button/Cta/fill/BtnFill';
import styled from 'styled-components';
import * as S from './TournamentStartButton.style';

interface TournamentStartButtonProps {
onClick: () => void;
}

const TournamentStartButton: React.FC<TournamentStartButtonProps> = ({ onClick }) => {
return (
<TournamentStartButtonWrapper>
<S.TournamentStartButtonWrapper>
<BtnFill customStyle={{ backgroundColor: '#FF2176', border: 'none' }} onClick={onClick}>
시작하기
</BtnFill>
</TournamentStartButtonWrapper>
</S.TournamentStartButtonWrapper>
);
};

const TournamentStartButtonWrapper = styled.div`
position: absolute;
margin-bottom: 2rem;
bottom: 0;
`;

export default TournamentStartButton;

0 comments on commit 14a1175

Please sign in to comment.