-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display driver ranking everywhere we display their name.
- Loading branch information
1 parent
330eef9
commit d11cbb3
Showing
7 changed files
with
78 additions
and
27 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,23 @@ | ||
import styled, { css } from 'styled-components'; | ||
|
||
const DriverNameInner = styled.span` | ||
${ | ||
props => props.theme.driverRanks[props.$rank?.replace('driver-', '')] && css` | ||
&::before { | ||
color: ${props.theme.driverRanks[props.$rank?.replace('driver-', '')]}; | ||
content: '●'; | ||
margin-right: 4px; | ||
font-style: normal; | ||
vertical-align: text-top; | ||
} | ||
` | ||
} | ||
`; | ||
|
||
export const DriverName = ({ name, rank }) => ( | ||
<DriverNameInner $rank={rank}> | ||
{name} | ||
</DriverNameInner> | ||
); |
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
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