From e7cdcf709971e924901c75449f22d56447c41a14 Mon Sep 17 00:00:00 2001 From: Pierre-Alain Date: Thu, 22 Apr 2021 23:05:20 +0900 Subject: [PATCH] feat: add max amount transfer --- src/css/global.css | 12 +++++++++ src/css/transfer-form.css | 6 ++++- src/html/erc20-form.html | 51 +++++++++++++++++++++++++++------------ src/html/erc20n-form.html | 38 ++++++++++++++++++++--------- 4 files changed, 79 insertions(+), 28 deletions(-) diff --git a/src/css/global.css b/src/css/global.css index 7d14d1b0..35fca405 100644 --- a/src/css/global.css +++ b/src/css/global.css @@ -253,6 +253,18 @@ button[disabled] { background: none; box-shadow: none; } +button.maxAmount { + font-size: var(--fs-micro); + color: var(--blue-500); + background-color: var(--light-gray); + border: 1px solid var(--blue-500); + text-align: center; + height: 20px; + padding: 0 var(--spacing-xs); + line-height: 20px; + margin-bottom: var(--spacing-s); + margin-right: var(--spacing-s); +} fieldset { border: none; diff --git a/src/css/transfer-form.css b/src/css/transfer-form.css index 3d179899..7a681e29 100644 --- a/src/css/transfer-form.css +++ b/src/css/transfer-form.css @@ -89,7 +89,7 @@ border-radius: 0.75em; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); display: flex; - margin: var(--spacing-m) 0; + margin: var(--spacing-m) 0 var(--spacing-s) 0; align-items: stretch; height: 56px; } @@ -138,6 +138,10 @@ -webkit-appearance: none; margin: 0; } +.maxAmountContainer { + display: flex; + justify-content: flex-end; +} .transfer-form input { text-align: right; } diff --git a/src/html/erc20-form.html b/src/html/erc20-form.html index 127aae63..6fc6386f 100644 --- a/src/html/erc20-form.html +++ b/src/html/erc20-form.html @@ -25,11 +25,16 @@

New Transfer

type="number" /> +
+ +
- 999.234234 - DAI + +