-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
424 adjust berlin results page UI to match other pages (#441)
* Create results columns * Add results columns to results page * Add icons * Create tables for results and stats * Fixes * Remove unused import * Update order * Comment code for plurality score at cycle * Remove unused code * Update columns and table dist
- Loading branch information
1 parent
ccad72a
commit 2e4e09e
Showing
26 changed files
with
198 additions
and
187 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
33 changes: 7 additions & 26 deletions
33
packages/berlin/src/components/result-card/ResultCard.styled.tsx
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 |
---|---|---|
@@ -1,37 +1,18 @@ | ||
import styled from 'styled-components'; | ||
import { Grid } from '../containers/Grid.styled'; | ||
|
||
export const Card = styled.article<{ $expanded: boolean }>` | ||
border-radius: 1rem; | ||
border: 1px solid var(--color-black); | ||
color: var(--color-white); | ||
export const Card = styled(Grid)<{ $expanded: boolean }>` | ||
cursor: pointer; | ||
border-bottom: 1px solid var(--color-black); | ||
grid-template-columns: auto repeat(3, 48px) 80px; | ||
overflow: hidden; | ||
padding: 2rem; | ||
padding: 1.5rem; | ||
position: relative; | ||
transition: height 0.3s ease-in-out; | ||
width: 100%; | ||
.statistics { | ||
.description { | ||
display: ${(props) => (props.$expanded ? 'flex' : 'none')}; | ||
} | ||
`; | ||
export const Badge = styled.div<{ $type: 'gold' | 'silver' | 'bronze' }>` | ||
align-items: center; | ||
background-image: ${(props) => props.$type && `url('/icons/badge-${props.$type}.svg')`}; | ||
background-position: center center; | ||
background-repeat: no-repeat; | ||
background-size: contain; | ||
display: flex; | ||
height: 2rem; | ||
width: 2rem; | ||
`; | ||
|
||
export const List = styled.ul` | ||
list-style: none; | ||
`; | ||
export const ListItem = styled.li` | ||
padding-left: 1rem; | ||
&::before { | ||
content: '• '; | ||
grid-column: 1/6; | ||
} | ||
`; |
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
8 changes: 8 additions & 0 deletions
8
packages/berlin/src/components/results-columns/ResultsColumns.styled.tsx
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,8 @@ | ||
import styled from 'styled-components'; | ||
import { Grid } from '../containers/Grid.styled'; | ||
|
||
export const Card = styled(Grid)` | ||
border-bottom: 2px solid var(--color-black); | ||
padding: 1.5rem; | ||
grid-template-columns: auto repeat(3, 48px) 80px; | ||
`; |
35 changes: 35 additions & 0 deletions
35
packages/berlin/src/components/results-columns/ResultsColumns.tsx
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,35 @@ | ||
import { useAppStore } from '../../store'; | ||
import IconButton from '../icon-button'; | ||
import { Bold } from '../typography/Bold.styled'; | ||
import { Card } from './ResultsColumns.styled'; | ||
|
||
function ResultsColumns() { | ||
const theme = useAppStore((state) => state.theme); | ||
return ( | ||
<Card> | ||
<Bold>Title</Bold> | ||
<IconButton | ||
$padding={0} | ||
$color="secondary" | ||
icon={{ src: `/icons/heart-full.svg`, alt: 'Hearts' }} | ||
/> | ||
<IconButton | ||
$padding={0} | ||
$color="secondary" | ||
icon={{ src: `/icons/sqrt-${theme}.svg`, alt: 'Quadratic score' }} | ||
/> | ||
<IconButton | ||
$padding={0} | ||
$color="secondary" | ||
icon={{ src: `/icons/plurality-score.svg`, alt: 'Plurality score' }} | ||
/> | ||
<IconButton | ||
$padding={0} | ||
$color="secondary" | ||
icon={{ src: `/logos/arbitrum-${theme}.svg`, alt: 'Arbitrum' }} | ||
/> | ||
</Card> | ||
); | ||
} | ||
|
||
export default ResultsColumns; |
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 @@ | ||
export { default } from './ResultsColumns'; |
11 changes: 0 additions & 11 deletions
11
packages/berlin/src/components/stat-card/StatCard.styled.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.