-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [Fix] TournamentInfo 날짜 타입 수정 #1104 * [Feat] 토너먼트 정보 표시 #1104 * [Feat] 리그선택버튼 기능구현 #1079 * [Style] 활성 버튼 디자인 #1079 * [Feat] 활성 버튼 스타일 변경 #1079 * [Fix] 버튼 스타일 변경 시 위치 이동되지 않도록 고정크기 적용 #1079
- Loading branch information
Showing
6 changed files
with
164 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React, { SetStateAction, useState } from 'react'; | ||
import styles from 'styles/tournament-record/LeagueButtonGroup.module.scss'; | ||
|
||
interface LeagueButtonGroupProps { | ||
onSelect: React.Dispatch<SetStateAction<string>>; | ||
} | ||
|
||
export default function LeagueButtonGroup({ | ||
onSelect, | ||
}: LeagueButtonGroupProps) { | ||
const [activeButton, setActiveButton] = useState('ROOKIE'); | ||
|
||
const handleClick = (league: string) => { | ||
onSelect(league); | ||
setActiveButton(league); | ||
}; | ||
|
||
return ( | ||
<div className={styles.leagueButtonWrapper}> | ||
<button | ||
onClick={() => handleClick('ROOKIE')} | ||
className={activeButton === 'ROOKIE' ? styles.active : ''} | ||
> | ||
Rookie | ||
</button> | ||
<button | ||
onClick={() => handleClick('MASTER')} | ||
className={activeButton === 'MASTER' ? styles.active : ''} | ||
> | ||
Master | ||
</button> | ||
<button | ||
onClick={() => handleClick('CUSTOM')} | ||
className={activeButton === 'CUSTOM' ? styles.active : ''} | ||
> | ||
Custom | ||
</button> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.leagueButtonWrapper { | ||
display: flex; | ||
padding-right: 2rem; | ||
padding-left: 2rem; | ||
margin-top: 1.4rem; | ||
justify-content: space-between; | ||
|
||
button { | ||
width: 5rem; | ||
height: 2rem; | ||
font-size: 1rem; | ||
font-weight: 400; | ||
color: #cbcbcb; | ||
background-color: transparent; | ||
border-color: transparent; | ||
|
||
&.active { | ||
font-weight: 700; | ||
color: #ffffff; | ||
border: 2px solid #9e00ff; | ||
border-radius: 0.6rem; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters