From 7f4b9546804b1de6e5db0572209f397da7e31112 Mon Sep 17 00:00:00 2001 From: reallybeard <89934888+reallybeard@users.noreply.github.com> Date: Wed, 4 Oct 2023 15:29:28 -0500 Subject: [PATCH] fix: clean up the form a little more (#5410) --- src/components/FeeExplainer/FeeExplainer.tsx | 52 ++++++---------- src/components/FeeExplainer/FeeSliders.tsx | 65 +++++++++++--------- src/components/FeeExplainer/common.tsx | 2 +- 3 files changed, 56 insertions(+), 63 deletions(-) diff --git a/src/components/FeeExplainer/FeeExplainer.tsx b/src/components/FeeExplainer/FeeExplainer.tsx index 98f6fa0ea95..8859bd46813 100644 --- a/src/components/FeeExplainer/FeeExplainer.tsx +++ b/src/components/FeeExplainer/FeeExplainer.tsx @@ -1,14 +1,4 @@ -import { - Box, - Card, - CardBody, - CardHeader, - Divider, - Flex, - Heading, - Stack, - useToken, -} from '@chakra-ui/react' +import { Box, Card, CardBody, Flex, Heading, Stack, useToken } from '@chakra-ui/react' import { LinearGradient } from '@visx/gradient' import { GridColumns, GridRows } from '@visx/grid' import { ParentSize, ScaleSVG } from '@visx/responsive' @@ -264,7 +254,7 @@ export const FeeOutput: React.FC = ({ tradeSize, foxHolding }) = }) return ( - + @@ -292,9 +282,10 @@ export const FeeOutput: React.FC = ({ tradeSize, foxHolding }) = color='text.subtle' fontSize='sm' textAlign='center' + mb={4} /> - + ) } @@ -318,22 +309,13 @@ export const FeeExplainer = () => { }, [currentFoxHoldings, isLoading]) return ( - - - {translate('foxDiscounts.simulateTitle')} - - - - - - - + + + + + {translate('foxDiscounts.simulateTitle')} + + { setFoxHolding={setFoxHolding} currentFoxHoldings={currentFoxHoldings ?? '0'} /> - - - + + + + + + + + + ) } diff --git a/src/components/FeeExplainer/FeeSliders.tsx b/src/components/FeeExplainer/FeeSliders.tsx index 249cced0673..6477f678183 100644 --- a/src/components/FeeExplainer/FeeSliders.tsx +++ b/src/components/FeeExplainer/FeeSliders.tsx @@ -1,11 +1,6 @@ import { TriangleDownIcon } from '@chakra-ui/icons' import { - Card, - CardBody, - CardFooter, - CardHeader, Center, - Divider, Flex, Skeleton, Slider, @@ -13,6 +8,7 @@ import { SliderMark, SliderThumb, SliderTrack, + Stack, VStack, } from '@chakra-ui/react' import { useTranslate } from 'react-polyglot' @@ -32,15 +28,15 @@ export const FeeSliders: React.FC = ({ }) => { const translate = useTranslate() return ( - }> - - + + + - + - - + + = ({ onChange={setFoxHolding} > - + @@ -64,25 +60,22 @@ export const FeeSliders: React.FC = ({ 1MM - + - - - -
- {translate('foxDiscounts.currentFoxPower')} - - - - - - + + + + - - - + + + @@ -94,12 +87,24 @@ export const FeeSliders: React.FC = ({ - + - - + + + + +
+ {translate('foxDiscounts.currentFoxPower')} + + + ) } diff --git a/src/components/FeeExplainer/common.tsx b/src/components/FeeExplainer/common.tsx index 56e0d652cce..b0407974e84 100644 --- a/src/components/FeeExplainer/common.tsx +++ b/src/components/FeeExplainer/common.tsx @@ -2,7 +2,7 @@ export const CHART_TRADE_SIZE_MAX_USD = 400000 export const CHART_TRADE_SIZE_MAX_FOX = 1100000 // let them go a bit past a millionexport const labelStyles = { export const labelStyles = { - fontSize: 'sm', + fontSize: 'xs', mt: '2', ml: '-2.5', color: 'text.subtle',