-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1461 from oasisprotocol/mz/staking-alt
Consensus: add debonding delegations to Staking card
- Loading branch information
Showing
12 changed files
with
207 additions
and
99 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 @@ | ||
Add debonding delegations to Staking card |
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,42 @@ | ||
import Box from '@mui/material/Box' | ||
import Chip from '@mui/material/Chip' | ||
import Typography from '@mui/material/Typography' | ||
import { COLORS } from '../../../styles/theme/colors' | ||
|
||
type FilterButtonsProps<T extends string> = { | ||
options: { label: string; value: T }[] | ||
onSelect: (value: T) => void | ||
value?: NoInfer<T> | ||
} | ||
|
||
export const FilterButtons = <T extends string>({ options, onSelect, value }: FilterButtonsProps<T>) => { | ||
return ( | ||
<Box sx={{ display: 'inline-flex' }}> | ||
{options.map(option => { | ||
const selected = option.value === value | ||
return ( | ||
<Chip | ||
key={option.value} | ||
onClick={() => onSelect(option.value)} | ||
clickable | ||
color="secondary" | ||
label={ | ||
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}> | ||
<Typography component="span" sx={{ fontSize: 16 }}> | ||
{option.label} | ||
</Typography> | ||
</Box> | ||
} | ||
sx={{ | ||
mr: 3, | ||
borderColor: COLORS.brandMedium, | ||
backgroundColor: selected ? COLORS.brandMedium : COLORS.brandMedium15, | ||
color: selected ? COLORS.white : COLORS.grayExtraDark, | ||
}} | ||
variant={selected ? 'outlined-selected' : 'outlined'} | ||
/> | ||
) | ||
})} | ||
</Box> | ||
) | ||
} |
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
Oops, something went wrong.