Skip to content

Commit

Permalink
Minor UI tweaks (wormhole-foundation#2626)
Browse files Browse the repository at this point in the history
* spacing tweak

* dimmer color for "Balance"

* remove colons

* remove padding around history button

* fix incorrect font
  • Loading branch information
artursapek authored Sep 17, 2024
1 parent de0f0bc commit 1213070
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 17 deletions.
18 changes: 6 additions & 12 deletions wormhole-connect/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@ export type WormholeConnectPartialTheme = {
modal?: {
background: string;
};
font?: {
primary: string;
header: string;
};
font?: string;
logo?: string;
};

Expand Down Expand Up @@ -149,10 +146,7 @@ export const light: WormholeConnectTheme = {
modal: {
background: '#ffffff',
},
font: {
primary: '"Inter", sans-serif',
header: '"IBM Plex Mono", monospace',
},
font: '"Inter", sans-serif',
logo: '#000000',
};

Expand Down Expand Up @@ -299,10 +293,7 @@ export const dark: WormholeConnectTheme = {
modal: {
background: '#181a2d',
},
font: {
primary: '"Inter", sans-serif',
header: '"Inter", sans-serif',
},
font: '"Inter", sans-serif',
logo: '#ffffff',
};

Expand Down Expand Up @@ -336,6 +327,9 @@ export const getDesignTokens = (customTheme: WormholeConnectPartialTheme) => {
xl: 1200,
},
},
typography: {
fontFamily: customTheme.font ?? '"Inter", sans-serif',
},
palette: {
...theme,
},
Expand Down
18 changes: 15 additions & 3 deletions wormhole-connect/src/views/v2/Bridge/AmountInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ const useStyles = makeStyles()((theme) => ({
inputError: {
marginTop: '12px',
},
balance: {
color: theme.palette.text.secondary,
},
}));

type Props = {
Expand Down Expand Up @@ -162,13 +165,22 @@ const AmountInput = (props: Props) => {

return (
<Stack direction="row" alignItems="center">
<Typography fontSize={14} textAlign="right" sx={{ marginRight: '4px' }}>
<Typography
fontSize={14}
textAlign="right"
sx={{ marginRight: '4px' }}
className={classes.balance}
>
Balance:
</Typography>
{isFetching ? (
<CircularProgress size={14} />
) : (
<Typography fontSize={14} textAlign="right">
<Typography
fontSize={14}
textAlign="right"
className={classes.balance}
>
{tokenBalance}
</Typography>
)}
Expand Down Expand Up @@ -199,7 +211,7 @@ const AmountInput = (props: Props) => {
return (
<div className={classes.amountContainer}>
<div className={classes.amountTitle}>
<Typography variant="body2">Amount:</Typography>
<Typography variant="body2">Amount</Typography>
</div>
<Card variant="elevation">
<CardContent className={classes.amountCardContent}>
Expand Down
2 changes: 2 additions & 0 deletions wormhole-connect/src/views/v2/Bridge/Routes/SingleRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ const useStyles = makeStyles()((theme: any) => ({
height: '14px',
position: 'relative',
top: '2px',
marginRight: '4px',
fill: theme.palette.primary.main,
},
cheapestBadge: {
width: '12px',
height: '12px',
position: 'relative',
top: '1px',
marginRight: '3px',
fill: theme.palette.primary.main,
},
}));
Expand Down
5 changes: 3 additions & 2 deletions wormhole-connect/src/views/v2/Bridge/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ const Bridge = () => {
return (
<div className={classes.assetPickerContainer}>
<div className={classes.assetPickerTitle}>
<Typography variant="body2">From:</Typography>
<Typography variant="body2">From</Typography>
<WalletController type={TransferWallet.SENDING} />
</div>
<AssetPicker
Expand Down Expand Up @@ -306,7 +306,7 @@ const Bridge = () => {
return (
<div className={classes.assetPickerContainer}>
<div className={classes.assetPickerTitle}>
<Typography variant="body2">To:</Typography>
<Typography variant="body2">To</Typography>
<WalletController type={TransferWallet.RECEIVING} />
</div>
<AssetPicker
Expand Down Expand Up @@ -347,6 +347,7 @@ const Bridge = () => {
>
<div>
<IconButton
sx={{ padding: 0 }}
disabled={isTxHistoryDisabled}
onClick={() => dispatch(setAppRoute('history'))}
>
Expand Down

0 comments on commit 1213070

Please sign in to comment.