Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions .changeset/wild-steaks-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

- Various UI/UX Improvements in Bridge components
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
}}
>
{/* USD Value */}
<Text color="primaryText" size="xl" weight={600}>
<Text color="primaryText" size="xl" weight={500}>

Check warning on line 222 in packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/TransactionPayment.tsx#L222

Added line #L222 was not covered by tests
{costToDisplay}
</Text>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
textOverflow: "ellipsis",
whiteSpace: "nowrap",
}}
weight={600}
weight={500}

Check warning on line 85 in packages/thirdweb/src/react/web/ui/Bridge/common/TokenAndChain.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/common/TokenAndChain.tsx#L85

Added line #L85 was not covered by tests
trackingTight
>
{token.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,9 @@
overflow: "hidden",
}}
>
<FiatValue
currency={currency}
chain={chain}
client={client}
<Text

Check warning on line 71 in packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx#L71

Added line #L71 was not covered by tests
color="primaryText"
size="sm"
token={token}
tokenAmount={amount}
/>
<Text
color="secondaryText"
size="xs"
style={{
overflow: "hidden",
textOverflow: "ellipsis",
Expand All @@ -91,6 +82,16 @@
minimumFractionDigits: 0,
})} ${token.symbol}`}
</Text>

<FiatValue
currency={currency}
chain={chain}
client={client}
color="secondaryText"
size="sm"
token={token}
tokenAmount={amount}
/>

Check warning on line 94 in packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/common/TokenBalanceRow.tsx#L86-L94

Added lines #L86 - L94 were not covered by tests
</Container>
</Container>
</StyledButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,23 @@
}}
>
<Img
src={props.chain?.icon}
src={props.chain?.icon || ""}

Check warning on line 103 in packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx#L103

Added line #L103 was not covered by tests
client={props.client}
width={iconSize.sm}
height={iconSize.sm}
style={{
borderRadius: radius.full,
}}
fallback={
<Container
style={{
background: `linear-gradient(45deg, white, ${theme.colors.accentText})`,
borderRadius: radius.full,
width: `${iconSize.sm}px`,
height: `${iconSize.sm}px`,
}}
/>

Check warning on line 118 in packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/common/selected-token-button.tsx#L110-L118

Added lines #L110 - L118 were not covered by tests
}
/>
</Container>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<WalletRow
address={sender}
client={props.client}
iconSize="md"
iconSize="lg"

Check warning on line 66 in packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx#L66

Added line #L66 was not covered by tests
textSize="sm"
/>
</Container>
Expand Down Expand Up @@ -91,13 +91,14 @@
py="sm"
style={{ justifyContent: "space-between" }}
>
{/* left */}
<Container center="y" flex="row" gap="sm">
{getFiatCurrencyIcon({
currency: props.paymentMethod.currency,
size: "lg",
})}
<Container center="y" flex="column" gap="3xs">
<Text color="primaryText" size="sm" style={{ fontWeight: 600 }}>
<Text color="primaryText" size="sm" weight={500}>

Check warning on line 101 in packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx#L101

Added line #L101 was not covered by tests
{props.paymentMethod.currency}
</Text>
<Text color="secondaryText" size="xs">
Expand All @@ -106,7 +107,8 @@
</Text>
</Container>
</Container>
<Text color="primaryText" size="sm" style={{ fontWeight: 600 }}>
{/* right */}
<Text color="primaryText" size="sm">

Check warning on line 111 in packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx#L111

Added line #L111 was not covered by tests
{props.fromAmount}
</Text>
</Container>
Expand Down Expand Up @@ -136,11 +138,12 @@
<WalletRow
address={props.receiver}
client={props.client}
iconSize="md"
iconSize="lg"

Check warning on line 141 in packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx#L141

Added line #L141 was not covered by tests
textSize="sm"
/>
</Container>
)}

{props.modeInfo.mode === "direct_payment" && (
<Container
center="y"
Expand All @@ -150,7 +153,7 @@
style={{ justifyContent: "space-between" }}
>
<Container center="y" flex="column" gap="3xs" style={{ flex: 1 }}>
<Text color="primaryText" size="sm" style={{ fontWeight: 600 }}>
<Text color="primaryText" size="sm" weight={500}>

Check warning on line 156 in packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx#L156

Added line #L156 was not covered by tests
{props.metadata.title || "Payment"}
</Text>
{props.metadata.description && (
Expand All @@ -173,7 +176,6 @@
size="sm"
token={props.toToken}
tokenAmount={props.modeInfo.paymentInfo.amount}
weight={600}
/>
<Text color="secondaryText" size="xs">
{props.modeInfo.paymentInfo.amount} {props.toToken.symbol}
Expand Down Expand Up @@ -285,7 +287,7 @@
style={{ justifyContent: "space-between" }}
>
<Container center="y" flex="column" gap="3xs" style={{ flex: 1 }}>
<Text color="primaryText" size="sm" style={{ fontWeight: 600 }}>
<Text color="primaryText" size="sm" weight={500}>

Check warning on line 290 in packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/payment-details/PaymentOverview.tsx#L290

Added line #L290 was not covered by tests
{props.metadata.title || "Transaction"}
</Text>
{props.metadata.description && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<Text
color="primaryText"
size="sm"
style={{ fontWeight: 600, textWrap: "nowrap" }}
style={{ fontWeight: 500, textWrap: "nowrap" }}

Check warning on line 92 in packages/thirdweb/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx#L92

Added line #L92 was not covered by tests
>
{formatCurrencyAmount(
currency || "USD",
Expand Down
Loading
Loading