Skip to content

Commit

Permalink
fix: FE GameSlot nth-child 대체 (Close #190)
Browse files Browse the repository at this point in the history
  • Loading branch information
dolphinlmg committed Jan 18, 2023
1 parent 92bcbc5 commit 64f1931
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 32 deletions.
14 changes: 7 additions & 7 deletions client/components/GameSlot/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ function GameSlotTable({ version, win, teamId, participants }: GameSlotTableProp
<table css={detailStyle.tableContainer(theme, teamId, win)}>
<thead>
<tr>
<th>
<th css={detailStyle.thFirst(theme, win)}>
<span>{win ? '승리' : '패배'}</span> ({teamId === 100 ? '블루' : '레드'}팀)
</th>
<th></th>
<th>KDA</th>
<th>빌드</th>
<th>준 피해량</th>
<th>받은 피해량</th>
<th>딜 유형</th>
<th css={detailStyle.width('4.1%')}></th>
<th css={detailStyle.width('6%')}>KDA</th>
<th css={detailStyle.width('19%')}>빌드</th>
<th css={detailStyle.width('16%')}>준 피해량</th>
<th css={detailStyle.width('16%')}>받은 피해량</th>
<th css={detailStyle.width('16%')}>딜 유형</th>
</tr>
</thead>
<tbody>
Expand Down
35 changes: 10 additions & 25 deletions client/components/GameSlot/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,32 +137,17 @@ export const detailStyle = {
th {
height: 22px;
}
th:nth-child(1) {
text-align: left;
color: ${theme.foreground};
span {
color: ${win ? theme.blue2 : theme.red2};
}
width: 22%;
}
th:nth-child(2) {
width: 4.1%;
}
th:nth-child(3) {
width: 6%;
}
th:nth-child(4) {
width: 19%;
}
th:nth-child(5) {
width: 16%;
}
th:nth-child(6) {
width: 16%;
}
th:nth-child(7) {
width: 16%;
`,
thFirst: (theme: Theme, win: boolean) => css`
text-align: left;
color: ${theme.foreground};
span {
color: ${win ? theme.blue2 : theme.red2};
}
width: 22%;
`,
width: (width: string) => css`
width: ${width};
`,
container: css`
position: relative;
Expand Down

0 comments on commit 64f1931

Please sign in to comment.