-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* client UI improvements * fix proof generation modal
- Loading branch information
Showing
18 changed files
with
403 additions
and
224 deletions.
There are no files selected for viewing
Binary file not shown.
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 |
---|---|---|
@@ -1,52 +1,34 @@ | ||
import { Currency } from 'src/constants/currencies' | ||
import { ThemedText } from 'src/theme/components' | ||
import { ChevronDown } from 'src/theme/components/icons' | ||
import styled from 'styled-components' | ||
|
||
import { Row } from '../Flex' | ||
|
||
const CurrencyCard = styled(Row)` | ||
background-color: ${({ theme }) => theme.bg2}; | ||
color: ${({ theme }) => theme.neutral1}; | ||
padding: ${({ theme }) => theme.grids.xs}; | ||
padding-right: ${({ theme }) => theme.grids.sm}; | ||
padding: 4px 8px 4px 4px; | ||
border: 1px solid ${({ theme }) => theme.border}; | ||
border-radius: 99px; | ||
img { | ||
width: 28px; | ||
height: 28px; | ||
border-radius: 28px; | ||
object-fit: cover; | ||
} | ||
` | ||
|
||
type CurrencyButtonProps< | ||
TSymbols extends string, | ||
TCurrency extends Currency, | ||
TAvailableCurrencies extends Record<TSymbols, TCurrency> | ||
> = { | ||
selectedCurrency: keyof TAvailableCurrencies | ||
availableCurrencies: TAvailableCurrencies | ||
interface CurrencyButtonProps { | ||
selectedCurrency: Currency | ||
} | ||
|
||
export const CurrencyButton = < | ||
TSymbols extends string, | ||
TCurrency extends Currency, | ||
TAvailableCurrencies extends Record<TSymbols, TCurrency> | ||
>( | ||
props: CurrencyButtonProps<TSymbols, TCurrency, TAvailableCurrencies> | ||
) => { | ||
const { selectedCurrency, availableCurrencies } = props | ||
|
||
const currency = availableCurrencies[selectedCurrency] | ||
|
||
export function CurrencyButton({ selectedCurrency }: CurrencyButtonProps) { | ||
return ( | ||
<CurrencyCard as="button" gap={4}> | ||
<img src={currency.img} alt={currency.name} /> | ||
|
||
<ThemedText.Title fontWeight={500}>{currency.name}</ThemedText.Title> | ||
<img src={selectedCurrency.img} alt={selectedCurrency.name} /> | ||
|
||
<ChevronDown width={18} height={18} /> | ||
<ThemedText.BodyPrimary fontWeight={500}>{selectedCurrency.name}</ThemedText.BodyPrimary> | ||
</CurrencyCard> | ||
) | ||
} |
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
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.