From 3de11356d4fbbdc81d14b9263d15f51a6926ea85 Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Thu, 8 Jun 2023 10:18:17 +0200 Subject: [PATCH] v1.4.8 --- package.json | 2 +- .../common/CellAmount/CellAmount.tsx | 2 +- .../common/Checkbox/Checkbox.module.scss | 55 +++++++++++-------- src/components/common/Checkbox/Checkbox.tsx | 20 +++++-- .../TermsOfService/TermsOfService.module.scss | 11 +--- .../common/TermsOfService/TermsOfService.tsx | 2 + src/components/common/Tooltip/Apy.tsx | 2 +- src/components/common/TxModal/Action.tsx | 16 ++++-- .../redbank/produceUpdatedAssetData.test.tsx | 8 --- .../redbank/produceUpdatedAssetData.ts | 12 +--- src/store/slices/redBank.ts | 7 +-- 11 files changed, 72 insertions(+), 65 deletions(-) diff --git a/package.json b/package.json index 828c4e0..f2e6a7c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "mars", "homepage": "./", - "version": "1.4.7", + "version": "1.4.8", "license": "SEE LICENSE IN LICENSE FILE", "private": false, "scripts": { diff --git a/src/components/common/CellAmount/CellAmount.tsx b/src/components/common/CellAmount/CellAmount.tsx index c43a15a..ddd702e 100644 --- a/src/components/common/CellAmount/CellAmount.tsx +++ b/src/components/common/CellAmount/CellAmount.tsx @@ -20,7 +20,7 @@ export const CellAmount = ({ denom, decimals, amount, noBalanceText }: Props) =>

0 && assetAmount < 0.01 ? 0.01 : assetAmount} - suffix={assetAmount > 0 && assetAmount < 0.01 ? '< ' : false} + prefix={assetAmount > 0 && assetAmount < 0.01 ? '< ' : false} />

{amount === 0 ? ( diff --git a/src/components/common/Checkbox/Checkbox.module.scss b/src/components/common/Checkbox/Checkbox.module.scss index b8eb968..1f29bb3 100644 --- a/src/components/common/Checkbox/Checkbox.module.scss +++ b/src/components/common/Checkbox/Checkbox.module.scss @@ -1,36 +1,47 @@ @import 'src/styles/master'; -.container { - display: flex; - align-items: center; - cursor: pointer; +.wrapper { + position: relative; .checkbox { - appearance: none; - margin-right: space(3); + display: none; + + &:checked { + & + .label:after { + transform: scale(1); + } + } + } + + .label { + display: flex; + align-items: center; cursor: pointer; + @include padding(4, 0, 0, 6); - font: inherit; - width: 1rem; - height: 1rem; - border: 1.5px solid $alphaWhite40; - border-radius: $borderRadiusXS; - display: grid; - place-content: center; - - &::before { + &:before { content: ''; - width: 0.5rem; - height: 0.5rem; + width: space(3); + height: space(3); + border: 1.5px solid $alphaWhite40; + border-radius: $borderRadiusXS; + position: absolute; + top: space(5); + left: 0; + } + + &:after { + content: ''; + width: space(2); + height: space(2); clip-path: polygon(14% 44%, 0% 65%, 40% 95%, 100% 26%, 85% 10%, 38% 62%); transform: scale(0); transform-origin: center center; transition: 100ms transform ease-in-out; - box-shadow: inset 1rem 1rem $colorWhite; - } - - &:checked::before { - transform: scale(1); + box-shadow: inset space(3) space(3) $colorWhite; + position: absolute; + top: space(6); + left: space(1); } } } diff --git a/src/components/common/Checkbox/Checkbox.tsx b/src/components/common/Checkbox/Checkbox.tsx index bdc48b5..6f24d19 100644 --- a/src/components/common/Checkbox/Checkbox.tsx +++ b/src/components/common/Checkbox/Checkbox.tsx @@ -1,4 +1,5 @@ -import React, { useState } from 'react' +import classNames from 'classnames' +import { useState } from 'react' import styles from './Checkbox.module.scss' @@ -6,6 +7,7 @@ interface Props { text: string className?: string onChecked: (isChecked: boolean) => void + name?: string } export const Checkbox = (props: Props) => { @@ -16,9 +18,17 @@ export const Checkbox = (props: Props) => { props.onChecked(!isChecked) } return ( - +
+ + +
) } diff --git a/src/components/common/TermsOfService/TermsOfService.module.scss b/src/components/common/TermsOfService/TermsOfService.module.scss index accf301..2d7fe4a 100644 --- a/src/components/common/TermsOfService/TermsOfService.module.scss +++ b/src/components/common/TermsOfService/TermsOfService.module.scss @@ -14,20 +14,15 @@ .card { max-width: min(rem-calc(500), 95vw); - @include padding(2, 4, 4, 4); + @include padding(2, 4, 8, 4); + max-height: 100vh; + overflow-y: auto; .subtitle { text-align: center; @include padding(4, 0, 0, 0); } - .checkbox { - display: grid; - grid-template-columns: auto auto; - align-items: baseline; - @include margin(4, 0); - } - .btn { @include margin(6, 0, 0); width: 100%; diff --git a/src/components/common/TermsOfService/TermsOfService.tsx b/src/components/common/TermsOfService/TermsOfService.tsx index ca7b514..590b09b 100644 --- a/src/components/common/TermsOfService/TermsOfService.tsx +++ b/src/components/common/TermsOfService/TermsOfService.tsx @@ -42,11 +42,13 @@ export const TermsOfService = () => { className={styles.checkbox} onChecked={(isChecked) => setIsFirstAccepted(isChecked)} text={t('common.termsOfService.term1')} + name='term1' /> setIsSecondAccepted(isChecked)} text={t('common.termsOfService.term2')} + name='term2' />