From 5b424306cbe2fff488493dd0915ddbaed20b2b81 Mon Sep 17 00:00:00 2001 From: Dmitry Kuksenko Date: Mon, 3 Apr 2023 12:06:06 +0300 Subject: [PATCH 1/7] feat(widget): LS-1166 fix styles --- index.ts | 4 +- src/Swap/SwapContainer.vue | 4 +- src/Swap/styles/swapContainer.scss | 1 + src/Swap/styles/swapInfo.scss | 2 + .../ReservesContainer/ReservesContainer.vue | 38 ------------------- tsconfig.json | 2 - 6 files changed, 6 insertions(+), 45 deletions(-) diff --git a/index.ts b/index.ts index d9abdbf..ff65dd8 100644 --- a/index.ts +++ b/index.ts @@ -1,8 +1,6 @@ import { loadWidget } from "./loader"; export { LiquidSwapWidget } from './main'; -import widgetStyles from './src/styles/index.scss?inline'; - loadWidget('liquidswap-widget'); -export { loadWidget, widgetStyles }; \ No newline at end of file +export { loadWidget }; \ No newline at end of file diff --git a/src/Swap/SwapContainer.vue b/src/Swap/SwapContainer.vue index 15fe969..58f8c64 100644 --- a/src/Swap/SwapContainer.vue +++ b/src/Swap/SwapContainer.vue @@ -73,7 +73,7 @@ v-if="!connected" type="submit" tabindex="5" - class="swap__button is-connect" + class="swap__button is-connect p-button-primary" > Connect Wallet @@ -81,7 +81,7 @@ v-else type="submit" tabindex="5" - class="swap__button" + class="swap__button p-button-primary" :class="[{ 'p-disabled': buttonState.disabled }, priceImpactClass]" :disabled="buttonState.disabled" > diff --git a/src/Swap/styles/swapContainer.scss b/src/Swap/styles/swapContainer.scss index 008106d..63b2ab5 100644 --- a/src/Swap/styles/swapContainer.scss +++ b/src/Swap/styles/swapContainer.scss @@ -117,6 +117,7 @@ height: 54px; font-size: 1.1rem; font-weight: 500; + //background-image: linear-gradient(90deg,#6039b0,#8d29c1 30.44%); &_warning { background: linear-gradient(89.82deg, #e57106 0.08%, #ee5d0c 99.85%); diff --git a/src/Swap/styles/swapInfo.scss b/src/Swap/styles/swapInfo.scss index 92f3ace..d061f81 100644 --- a/src/Swap/styles/swapInfo.scss +++ b/src/Swap/styles/swapInfo.scss @@ -65,6 +65,8 @@ padding: 0; border: none; } + + margin-bottom: 0; } &__header { diff --git a/src/components/ReservesContainer/ReservesContainer.vue b/src/components/ReservesContainer/ReservesContainer.vue index 89da5fa..29431d1 100644 --- a/src/components/ReservesContainer/ReservesContainer.vue +++ b/src/components/ReservesContainer/ReservesContainer.vue @@ -49,44 +49,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/components/ContractSwitch/contractSwitch.scss b/src/components/ContractSwitch/contractSwitch.scss index 9289668..8fd968c 100644 --- a/src/components/ContractSwitch/contractSwitch.scss +++ b/src/components/ContractSwitch/contractSwitch.scss @@ -1,6 +1,6 @@ .list__pool-version-row { margin-bottom: 0.5rem; - padding: 0 16px; + padding: 0 8px; font-size: 15px; width: 100%; display: flex; From d6c87f95b4f5ab41577668269a64bee4ca337909 Mon Sep 17 00:00:00 2001 From: Dmitry Kuksenko Date: Mon, 3 Apr 2023 18:18:00 +0300 Subject: [PATCH 4/7] feat(widget): LS-1166 fix buttons colors --- src/Swap/SwapContainer.vue | 4 ++-- src/Swap/styles/swapContainer.scss | 8 +++++++- src/components/SwapConfirm/styles/swapPreview.scss | 5 +++++ src/components/TxSettingsDialog/txSettingsDialog.scss | 10 ++++++++-- 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/Swap/SwapContainer.vue b/src/Swap/SwapContainer.vue index 4b5c2e4..fdf5894 100644 --- a/src/Swap/SwapContainer.vue +++ b/src/Swap/SwapContainer.vue @@ -73,7 +73,7 @@ v-if="!connected" type="submit" tabindex="5" - class="swap__button is-connect p-button-primary" + class="swap__button is-connect" > Connect Wallet @@ -81,7 +81,7 @@ v-else type="submit" tabindex="5" - class="swap__button p-button-primary" + class="swap__button" :class="[{ 'p-disabled': buttonState.disabled }, priceImpactClass]" :disabled="buttonState.disabled" > diff --git a/src/Swap/styles/swapContainer.scss b/src/Swap/styles/swapContainer.scss index 5a96b1e..6fc9f0f 100644 --- a/src/Swap/styles/swapContainer.scss +++ b/src/Swap/styles/swapContainer.scss @@ -130,6 +130,13 @@ &_alert { background: linear-gradient(89.82deg, #d75050 0.08%, #c62828 99.85%); } + + transition: all .25s ease-in-out; + + &:enabled:hover { + background: linear-gradient(90deg, #8d6ad5, #6f42ca); + color: white; + } } &__toggle { @@ -154,4 +161,3 @@ } } } - diff --git a/src/components/SwapConfirm/styles/swapPreview.scss b/src/components/SwapConfirm/styles/swapPreview.scss index 018412d..1eabae9 100644 --- a/src/components/SwapConfirm/styles/swapPreview.scss +++ b/src/components/SwapConfirm/styles/swapPreview.scss @@ -79,6 +79,11 @@ height: 44px; background: linear-gradient(90deg, #6E42CA 0%, #8D29C1 100%); + &:enabled:hover { + background: linear-gradient(90deg, #8d6ad5, #6f42ca); + color: white; + } + span { position: absolute; margin: auto; diff --git a/src/components/TxSettingsDialog/txSettingsDialog.scss b/src/components/TxSettingsDialog/txSettingsDialog.scss index faccc84..9c0933b 100644 --- a/src/components/TxSettingsDialog/txSettingsDialog.scss +++ b/src/components/TxSettingsDialog/txSettingsDialog.scss @@ -43,12 +43,18 @@ height: 32px; padding: 3px 16px; font-size: 0.875rem; + background: linear-gradient(90deg, #6E42CA 0%, #8D29C1 100%); + border: none; + + &--action { height: 32px; padding: 3px 16px; font-size: 0.875rem; - background: #43395B; - border: none; + } + &:enabled:hover { + background: linear-gradient(90deg, #8d6ad5, #6f42ca); + color: white; } } From 91fe545860910f3d6fc5dd3b2892eaaebf560468 Mon Sep 17 00:00:00 2001 From: Dmitry Kuksenko Date: Mon, 3 Apr 2023 18:44:50 +0300 Subject: [PATCH 5/7] feat(widget): LS-1166 fix buttons colors --- src/Swap/SwapInfo.vue | 2 +- src/Swap/styles/swapInfo.scss | 6 ++++++ src/components/ContractSwitch/contractSwitch.scss | 1 - src/components/Steps/SendTransaction/SubmitTransaction.vue | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Swap/SwapInfo.vue b/src/Swap/SwapInfo.vue index 6c2c058..b90911c 100644 --- a/src/Swap/SwapInfo.vue +++ b/src/Swap/SwapInfo.vue @@ -21,7 +21,7 @@ -
+
Expected Output
From c8038b94ae9acbe82b27f4520d72d6d8fc6b30b7 Mon Sep 17 00:00:00 2001 From: Dmitry Kuksenko Date: Wed, 5 Apr 2023 11:24:05 +0300 Subject: [PATCH 6/7] feat(widget): LS-1166 fix widget styles for wallet --- src/Swap/SwapContainer.vue | 6 +-- src/Swap/SwapInput.vue | 4 +- src/Swap/styles/swapContainer.scss | 47 ++++++++++++++++++- src/components/ButtonToken/buttonToken.scss | 2 +- src/components/CurveSwitch/curveSwitch.scss | 5 ++ .../ReservesContainer/reservesContainer.scss | 3 -- src/composables/useAccountBalance.ts | 8 ++-- 7 files changed, 60 insertions(+), 15 deletions(-) diff --git a/src/Swap/SwapContainer.vue b/src/Swap/SwapContainer.vue index fdf5894..d4f8c12 100644 --- a/src/Swap/SwapContainer.vue +++ b/src/Swap/SwapContainer.vue @@ -1,6 +1,6 @@