-
-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(suite): rewtite assets table with Table comp
- Loading branch information
Showing
6 changed files
with
117 additions
and
176 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
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
58 changes: 20 additions & 38 deletions
58
packages/suite/src/views/dashboard/AssetsView/AssetTable/AssetTableHeader.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,43 +1,25 @@ | ||
import styled from 'styled-components'; | ||
|
||
import { spacingsPx, typography } from '@trezor/theme'; | ||
|
||
import { Translation } from 'src/components/suite'; | ||
import { AssetTableRowGrid } from './AssetTableRowGrid'; | ||
|
||
const Header = styled.div` | ||
display: flex; | ||
${typography.hint} | ||
color: ${({ theme }) => theme.textSubdued}; | ||
align-items: center; | ||
padding: ${spacingsPx.sm} 0; | ||
border-bottom: 1px solid ${({ theme }) => theme.borderElevation2}; | ||
&:last-child { | ||
padding-right: ${spacingsPx.md}; | ||
} | ||
`; | ||
|
||
const HeaderRight = styled(Header)` | ||
justify-content: right; | ||
padding-right: ${spacingsPx.xxxl}; | ||
`; | ||
import { Table } from '@trezor/components'; | ||
|
||
export const AssetTableHeader = () => ( | ||
<AssetTableRowGrid> | ||
<Header /> {/* Logo */} | ||
<Header> | ||
<Translation id="TR_ASSETS" /> | ||
</Header> | ||
<Header> | ||
<Translation id="TR_VALUES" /> | ||
</Header> | ||
<HeaderRight> | ||
<Translation id="TR_EXCHANGE_RATE" /> | ||
</HeaderRight> | ||
<Header> | ||
<Translation id="TR_7D_CHANGE" /> | ||
</Header> | ||
<Header /> {/* Buy Button */} | ||
</AssetTableRowGrid> | ||
<Table.Header> | ||
<Table.Row> | ||
<Table.Cell>{/* Logo */}</Table.Cell> | ||
<Table.Cell colSpan={2}> | ||
<Translation id="TR_ASSETS" /> | ||
</Table.Cell> | ||
<Table.Cell> | ||
<Translation id="TR_VALUES" /> | ||
</Table.Cell> | ||
<Table.Cell> | ||
<Translation id="TR_EXCHANGE_RATE" /> | ||
</Table.Cell> | ||
<Table.Cell> | ||
<Translation id="TR_7D_CHANGE" /> | ||
</Table.Cell> | ||
<Table.Cell>{' ' /* Buy Button */}</Table.Cell> | ||
<Table.Cell>{' ' /* Arrow */}</Table.Cell> | ||
</Table.Row> | ||
</Table.Header> | ||
); |
Oops, something went wrong.