Skip to content

Commit

Permalink
fix(bridge-ui): max button css (#13192)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadab-taiko authored Feb 20, 2023
1 parent 667a5d9 commit 9547f94
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
21 changes: 14 additions & 7 deletions packages/bridge-ui/src/components/form/BridgeForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,20 @@
<span class="label-text">{$_("bridgeForm.fieldLabel")}</span>

{#if $signer && tokenBalance}
<button class="label-text" on:click={useFullAmount}
>{$_("bridgeForm.maxLabel")}
{tokenBalance.length > 10
? `${truncateString(tokenBalance, 6)}...`
: tokenBalance}
{$token.symbol}
</button>{/if}
<div class="label-text ">
<span>
{$_("bridgeForm.balance")}:
{tokenBalance.length > 10
? `${truncateString(tokenBalance, 6)}...`
: tokenBalance}
{$token.symbol}
</span>

<button class="btn btn-xs rounded-md hover:border-accent text-xs ml-1 h-[20px]" on:click={useFullAmount}>
{$_("bridgeForm.maxLabel")}
</button>
</div>
{/if}
</label>

<label
Expand Down
3 changes: 2 additions & 1 deletion packages/bridge-ui/src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ function setupI18n({ withLocale: _locale } = { withLocale: "en" }) {
},
bridgeForm: {
fieldLabel: "Amount",
maxLabel: "Max:",
maxLabel: "Max",
balance: "Balance",
processingFeeLabel: "Processing Fee",
bridge: "Bridge",
approve: "Approve",
Expand Down

0 comments on commit 9547f94

Please sign in to comment.