Skip to content

Commit

Permalink
Moar transversal cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
mvaivre committed Dec 16, 2024
1 parent 435a301 commit 2d29a52
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 16 deletions.
14 changes: 4 additions & 10 deletions apps/desktop-wallet/src/components/AddressRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import styled from 'styled-components'

import AddressBadge from '@/components/AddressBadge'
import AddressColorIndicator from '@/components/AddressColorIndicator'
import { TableRow } from '@/components/Table'
import { TableCell, TableRow } from '@/components/Table'

interface AddressRowProps {
addressHash: AddressHash
Expand All @@ -41,25 +41,19 @@ const AddressRow = ({ addressHash, onClick, children, className, subtitle }: Add
onKeyDown={() => onClick && onClick(addressHash)}
className={className}
>
<Row>
<TableCell>
<AddressColorIndicatorStyled addressHash={addressHash} />
<Label>
<AddressBadge addressHash={addressHash} hideColorIndication truncate appendHash displayHashUnder />
<AddressSubtitle>{subtitle}</AddressSubtitle>
</Label>
{children}
</Row>
</TableCell>
{children && <TableCell>{children}</TableCell>}
</TableRow>
)

export default AddressRow

const Row = styled.div`
display: flex;
align-items: center;
flex-grow: 1;
`

const AddressColorIndicatorStyled = styled(AddressColorIndicator)`
margin-right: 15px;
`
Expand Down
1 change: 1 addition & 0 deletions apps/desktop-wallet/src/components/CheckMark.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ export default styled(CheckMark)`
color: var(--color-white);
border-radius: 40px;
padding: 3px;
margin: 0 var(--spacing-2);
`
2 changes: 2 additions & 0 deletions apps/desktop-wallet/src/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export interface TableRowProps extends TableColumnsProps {
}

export const TableRow = styled(TableColumns)<TableRowProps>`
min-height: var(--inputHeight);
${({ onClick }) =>
onClick &&
css`
Expand Down
1 change: 1 addition & 0 deletions apps/desktop-wallet/src/components/TokenBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ const TokenBadgeText = ({
isLoading={isLoadingAmount}
showPlusMinus={displaySign}
highlight={displaySign}
semiBold
/>
)

Expand Down
2 changes: 1 addition & 1 deletion apps/desktop-wallet/src/components/WorthOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface WorthOverviewProps extends AmountLoaderProps {
}

const WorthOverview = ({ overrideWorth, worth, ...props }: WorthOverviewProps) => (
<WorthOverviewStyled value={overrideWorth ?? worth} isFiat loaderHeight={32} tabIndex={0} {...props} />
<WorthOverviewStyled value={overrideWorth ?? worth} isFiat loaderHeight={32} tabIndex={0} semiBold {...props} />
)

export default WorthOverview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const WalletsSettingsSection = () => {
return (
<>
<Section align="flex-start" role="table">
<h2>{t('Wallet list')}</h2>
<BoxContainerStyled role="rowgroup">
{wallets.map((wallet) => (
<WalletItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface AddressWorthProps {
const AddressWorth = ({ addressHash }: AddressWorthProps) => {
const { data: worth, isLoading } = useFetchAddressWorth(addressHash)

return <Amount value={worth} isFiat isLoading={isLoading} loaderHeight={18.5} />
return <Amount value={worth} isFiat isLoading={isLoading} loaderHeight={18.5} semiBold />
}

export default AddressWorth
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import ActionLink from '@/components/ActionLink'
import AddressRow from '@/components/AddressRow'
import Amount from '@/components/Amount'
import FocusableContent from '@/components/FocusableContent'
import { ExpandableTable, ExpandRow, TableCell, TableHeader } from '@/components/Table'
import { ExpandableTable, ExpandRow, TableHeader } from '@/components/Table'
import { openModal } from '@/features/modals/modalActions'
import { useAppDispatch } from '@/hooks/redux'
import { useFetchSortedAddressesHashes } from '@/hooks/useAddresses'
Expand Down Expand Up @@ -84,9 +84,7 @@ const AddressesRows = ({ className, isExpanded, onExpand, onAddressClick }: Addr
<motion.div {...fadeIn} className={className}>
{allAddressHashes.map((addressHash) => (
<AddressRow addressHash={addressHash} onClick={handleRowClick} key={addressHash}>
<TableCell>
<AddressWorth addressHash={addressHash} />
</TableCell>
<AddressWorth addressHash={addressHash} />
</AddressRow>
))}
</motion.div>
Expand Down

0 comments on commit 2d29a52

Please sign in to comment.