Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ export const TokenAmount = ({
}: Readonly<Props>): JSX.Element => {
return (
<Flex flexDirection="column" alignItems="flex-end" className={cx.container}>
<Text.Body.Large weight="$semibold">{amount}</Text.Body.Large>
<Text.Body.Large weight="$semibold" data-testid="token-amount">
{amount}
</Text.Body.Large>
<Text.Body.Normal color="secondary" weight="$semibold">
{fiatPrice}
</Text.Body.Normal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,19 @@ export const TokenProfile = ({
<Grid columns="$fitContent" gutters="$0">
<Cell>
<Box mr="$24">
<Image imageSrc={imageSrc} alt={name} />
<Image imageSrc={imageSrc} alt={name} testId="token-icon" />
</Box>
</Cell>
<Cell>
<Text.Body.Large weight="$semibold">{name}</Text.Body.Large>
<Text.Body.Large weight="$semibold" data-testid="token-name">
{name}
</Text.Body.Large>
<Box>
<Text.Body.Normal color="secondary" weight="$semibold">
<Text.Body.Normal
color="secondary"
weight="$semibold"
data-testid="token-ticker"
>
{description}
</Text.Body.Normal>
</Box>
Expand Down
9 changes: 8 additions & 1 deletion src/design-system/profile-picture/image.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface Props {
alt?: string;
delayMs?: number;
selected?: boolean;
testId?: string;
}

export const Image = ({
Expand All @@ -20,13 +21,19 @@ export const Image = ({
alt,
delayMs = 600,
selected,
testId = 'image',
}: Readonly<Props>): JSX.Element => (
<RadixUIAvatar.Root
className={classNames(cx.root, cx.container, {
[cx.selected]: selected,
})}
>
<RadixUIAvatar.Image className={cx.image} src={imageSrc} alt={alt} />
<RadixUIAvatar.Image
className={cx.image}
src={imageSrc}
alt={alt}
data-testid={testId}
/>
<RadixUIAvatar.Fallback delayMs={delayMs}>
{fallback}
</RadixUIAvatar.Fallback>
Expand Down