Skip to content

Commit

Permalink
chore(suite): table components
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasklim committed Oct 30, 2024
1 parent 711c2a6 commit 7df020d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const AssetTable = ({
assetsData,
assetsFiatBalances,
}: AssetTableProps) => (
<Table isRowHighlightedOnHover margin={{ top: spacings.md, bottom: spacings.md }}>
<Table isRowHighlightedOnHover margin={{ top: spacings.xs }}>
<Table.Header>
<Table.Row>
<Table.Cell colSpan={3}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export const AssetsView = () => {
)}
</>
) : (
<Card paddingType="none">
<Card paddingType="none" overflow="hidden">
<AssetTable
assetsData={assetsData}
assetsFiatBalances={assetsFiatBalances}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ export const UsedAddresses = ({
const actionHideVisible = limit > DEFAULT_LIMIT;

return (
<Card margin={{ bottom: spacings.xxxl }} overflow="hidden" paddingType="normal">
<Card overflow="hidden" paddingType="none">
<Column alignItems="stretch" gap={spacings.md}>
<Table>
<Table margin={{ top: spacings.xs, bottom: spacings.xs }}>
<Table.Header>
<Table.Row>
<Table.Cell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,12 @@ export const TokensTable = ({
return (
<Card paddingType="none" overflow="hidden">
{tokensWithBalance.length === 0 && tokensWithoutBalance.length === 0 && searchQuery ? (
<Paragraph
typographyStyle="highlight"
margin={{ top: spacings.xxl, bottom: spacings.xxl }}
align="center"
>
<Paragraph margin={{ top: spacings.xxl, bottom: spacings.xxl }} align="center">
<Translation id="TR_NO_SEARCH_RESULTS" />
</Paragraph>
) : (
<Table
margin={{ top: spacings.xs, bottom: spacings.xs }}
margin={{ top: spacings.xs }}
colWidths={[
{ minWidth: '200px', maxWidth: '250px' },
{ minWidth: '140px', maxWidth: '250px' }, // due to HiddenPlaceholder - it changes content width when hovered
Expand Down Expand Up @@ -95,13 +91,10 @@ export const TokensTable = ({
))}
{tokensWithoutBalance.length !== 0 && (
<>
<Table.Row
onClick={() => setIsZeroBalanceOpen(!isZeroBalanceOpen)}
isHighlightedOnHover={false}
>
<Table.Row onClick={() => setIsZeroBalanceOpen(!isZeroBalanceOpen)}>
<Table.Cell colSpan={5}>
<ZeroBalanceToggle>
<Row gap={spacings.xs} margin={{ top: spacings.md }}>
<Row gap={spacings.xs}>
<IconWrapper $isActive={isZeroBalanceOpen}>
<Icon
size={18}
Expand Down

0 comments on commit 7df020d

Please sign in to comment.