-
-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(trade): last transactions design
- Loading branch information
1 parent
41fec8f
commit f454923
Showing
6 changed files
with
46 additions
and
23 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
packages/suite/src/views/wallet/coinmarket/common/CoinmarketIcon.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,27 @@ | ||
import styled from 'styled-components'; | ||
|
||
import { Box, iconSizes, Image } from '@trezor/components'; | ||
import { borders, spacings } from '@trezor/theme'; | ||
|
||
import { useSelector } from 'src/hooks/suite'; | ||
|
||
const CoinmarketIconWrapper = styled.div<{ $isDark: boolean }>` | ||
${({ $isDark }) => $isDark && `background-color: #fff;`} | ||
border-radius: ${borders.radii.xxs}; | ||
`; | ||
|
||
interface CoinmarketIconProps { | ||
iconUrl: string; | ||
} | ||
|
||
export const CoinmarketIcon = ({ iconUrl }: CoinmarketIconProps) => { | ||
const currentTheme = useSelector(state => state.suite.settings.theme.variant); | ||
|
||
return ( | ||
<CoinmarketIconWrapper $isDark={currentTheme === 'dark'}> | ||
<Box margin={spacings.xxxs} height={iconSizes.mediumLarge}> | ||
<Image imageSrc={iconUrl} width={iconSizes.mediumLarge} alt="" /> | ||
</Box> | ||
</CoinmarketIconWrapper> | ||
); | ||
}; |
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