Skip to content

Commit

Permalink
feat(bridge-ui-v2): Processing fee input box (#14527)
Browse files Browse the repository at this point in the history
  • Loading branch information
KorbinianK authored Aug 17, 2023
1 parent 072afbf commit 886ab31
Showing 1 changed file with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import { InputBox } from '$components/InputBox';
import { LoadingText } from '$components/LoadingText';
import { Tooltip } from '$components/Tooltip';
import { processingFeeComponent } from '$config';
import { ProcessingFeeMethod } from '$libs/fee';
import { parseToWei } from '$libs/util/parseToWei';
import { uid } from '$libs/util/uid';
Expand Down Expand Up @@ -62,6 +63,12 @@
closeModal();
}
function closeModalWithDelay() {

Check warning on line 66 in packages/bridge-ui-v2/src/components/Bridge/ProcessingFee/ProcessingFee.svelte

View workflow job for this annotation

GitHub Actions / build

'closeModalWithDelay' is defined but never used
// By adding delay there is enough time to see the selected option
// before closing the modal. Better experience for the user.
setTimeout(closeModal, processingFeeComponent.closingDelayOptionClick);
}
function focusInputBox() {
inputBox.focus();
}
Expand Down Expand Up @@ -217,19 +224,19 @@
bind:group={selectedFeeMethod} />
</li>
</ul>

<div class="relative f-items-center my-[20px]">
<InputBox
type="number"
min="0"
placeholder="0.01"
disabled={selectedFeeMethod !== ProcessingFeeMethod.CUSTOM}
class="w-full input-box outline-none p-6 pr-16 title-subsection-bold placeholder:text-tertiary-content"
on:input={inputProcessFee}
bind:this={inputBox} />
<span class="absolute right-6 uppercase body-bold text-secondary-content">ETH</span>
{#if selectedFeeMethod === ProcessingFeeMethod.CUSTOM}
<InputBox
type="number"
min="0"
placeholder="0.01"
disabled={selectedFeeMethod !== ProcessingFeeMethod.CUSTOM}
class="w-full input-box outline-none p-6 pr-16 title-subsection-bold placeholder:text-tertiary-content"
on:input={inputProcessFee}
bind:this={inputBox} />
<span class="absolute right-6 uppercase body-bold text-secondary-content">ETH</span>
{/if}
</div>

<div class="grid grid-cols-2 gap-[20px]">
<Button
on:click={cancelModal}
Expand Down

1 comment on commit 886ab31

@vercel
Copy link

@vercel vercel bot commented on 886ab31 Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

bridge-ui-v2 – ./packages/bridge-ui-v2

bridge-ui-v2-git-main-taikoxyz.vercel.app
bridge-ui-v2-taikoxyz.vercel.app
taiko-mono-bridge-ui-v2.vercel.app

Please sign in to comment.