diff --git a/e2e/screenshots/simulator/recurring/Recurring_range_range/simulator-results-animation.png b/e2e/screenshots/simulator/recurring/Recurring_range_range/simulator-results-animation.png index 40e8486b2..04b9fba73 100644 Binary files a/e2e/screenshots/simulator/recurring/Recurring_range_range/simulator-results-animation.png and b/e2e/screenshots/simulator/recurring/Recurring_range_range/simulator-results-animation.png differ diff --git a/e2e/screenshots/strategy/disposable/Disposable_buy_limit/create/form.png b/e2e/screenshots/strategy/disposable/Disposable_buy_limit/create/form.png index 27f58ce98..6fa29648d 100644 Binary files a/e2e/screenshots/strategy/disposable/Disposable_buy_limit/create/form.png and b/e2e/screenshots/strategy/disposable/Disposable_buy_limit/create/form.png differ diff --git a/e2e/screenshots/strategy/disposable/Disposable_buy_limit/create/my-strategy.png b/e2e/screenshots/strategy/disposable/Disposable_buy_limit/create/my-strategy.png index e1c67756d..e6b59d3a9 100644 Binary files a/e2e/screenshots/strategy/disposable/Disposable_buy_limit/create/my-strategy.png and b/e2e/screenshots/strategy/disposable/Disposable_buy_limit/create/my-strategy.png differ diff --git a/e2e/screenshots/strategy/disposable/Disposable_buy_range/create/form.png b/e2e/screenshots/strategy/disposable/Disposable_buy_range/create/form.png index e83f73c35..3a0fbc87a 100644 Binary files a/e2e/screenshots/strategy/disposable/Disposable_buy_range/create/form.png and b/e2e/screenshots/strategy/disposable/Disposable_buy_range/create/form.png differ diff --git a/e2e/screenshots/strategy/disposable/Disposable_buy_range/create/my-strategy.png b/e2e/screenshots/strategy/disposable/Disposable_buy_range/create/my-strategy.png index 48354173b..b07827989 100644 Binary files a/e2e/screenshots/strategy/disposable/Disposable_buy_range/create/my-strategy.png and b/e2e/screenshots/strategy/disposable/Disposable_buy_range/create/my-strategy.png differ diff --git a/e2e/screenshots/strategy/disposable/Disposable_buy_range/undercut/form.png b/e2e/screenshots/strategy/disposable/Disposable_buy_range/undercut/form.png index 165cffdf8..d3ad1c480 100644 Binary files a/e2e/screenshots/strategy/disposable/Disposable_buy_range/undercut/form.png and b/e2e/screenshots/strategy/disposable/Disposable_buy_range/undercut/form.png differ diff --git a/e2e/screenshots/strategy/disposable/Disposable_sell_limit/create/my-strategy.png b/e2e/screenshots/strategy/disposable/Disposable_sell_limit/create/my-strategy.png index fb95af510..dfca2140d 100644 Binary files a/e2e/screenshots/strategy/disposable/Disposable_sell_limit/create/my-strategy.png and b/e2e/screenshots/strategy/disposable/Disposable_sell_limit/create/my-strategy.png differ diff --git a/e2e/screenshots/strategy/disposable/Disposable_sell_range/create/my-strategy.png b/e2e/screenshots/strategy/disposable/Disposable_sell_range/create/my-strategy.png index 85ee97c9a..73eedbe8e 100644 Binary files a/e2e/screenshots/strategy/disposable/Disposable_sell_range/create/my-strategy.png and b/e2e/screenshots/strategy/disposable/Disposable_sell_range/create/my-strategy.png differ diff --git a/e2e/screenshots/strategy/overlapping/Overlapping/create/my-strategy.png b/e2e/screenshots/strategy/overlapping/Overlapping/create/my-strategy.png index 1bfeb68b1..7f84c6e4f 100644 Binary files a/e2e/screenshots/strategy/overlapping/Overlapping/create/my-strategy.png and b/e2e/screenshots/strategy/overlapping/Overlapping/create/my-strategy.png differ diff --git a/e2e/screenshots/strategy/overlapping/Overlapping/editPrices/form.png b/e2e/screenshots/strategy/overlapping/Overlapping/editPrices/form.png index 31467370a..9315a9205 100644 Binary files a/e2e/screenshots/strategy/overlapping/Overlapping/editPrices/form.png and b/e2e/screenshots/strategy/overlapping/Overlapping/editPrices/form.png differ diff --git a/e2e/screenshots/strategy/recurring/Recurring_limit_limit/create/my-strategy.png b/e2e/screenshots/strategy/recurring/Recurring_limit_limit/create/my-strategy.png index 88adc229d..fd5fa417e 100644 Binary files a/e2e/screenshots/strategy/recurring/Recurring_limit_limit/create/my-strategy.png and b/e2e/screenshots/strategy/recurring/Recurring_limit_limit/create/my-strategy.png differ diff --git a/e2e/screenshots/strategy/recurring/Recurring_limit_range/create/my-strategy.png b/e2e/screenshots/strategy/recurring/Recurring_limit_range/create/my-strategy.png index 3aa335d80..53a57c4c0 100644 Binary files a/e2e/screenshots/strategy/recurring/Recurring_limit_range/create/my-strategy.png and b/e2e/screenshots/strategy/recurring/Recurring_limit_range/create/my-strategy.png differ diff --git a/e2e/screenshots/strategy/recurring/Recurring_range_limit/create/form.png b/e2e/screenshots/strategy/recurring/Recurring_range_limit/create/form.png index b832884cd..78cdd4d14 100644 Binary files a/e2e/screenshots/strategy/recurring/Recurring_range_limit/create/form.png and b/e2e/screenshots/strategy/recurring/Recurring_range_limit/create/form.png differ diff --git a/e2e/screenshots/strategy/recurring/Recurring_range_limit/create/my-strategy.png b/e2e/screenshots/strategy/recurring/Recurring_range_limit/create/my-strategy.png index 8b4038cdd..4ef67a7aa 100644 Binary files a/e2e/screenshots/strategy/recurring/Recurring_range_limit/create/my-strategy.png and b/e2e/screenshots/strategy/recurring/Recurring_range_limit/create/my-strategy.png differ diff --git a/e2e/screenshots/strategy/recurring/Recurring_range_range/create/my-strategy.png b/e2e/screenshots/strategy/recurring/Recurring_range_range/create/my-strategy.png index d8d030add..0d38f6862 100644 Binary files a/e2e/screenshots/strategy/recurring/Recurring_range_range/create/my-strategy.png and b/e2e/screenshots/strategy/recurring/Recurring_range_range/create/my-strategy.png differ diff --git a/src/assets/icons/grid.svg b/src/assets/icons/grid.svg new file mode 100644 index 000000000..d3547d226 --- /dev/null +++ b/src/assets/icons/grid.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/assets/icons/table.svg b/src/assets/icons/table.svg new file mode 100644 index 000000000..d64c82724 --- /dev/null +++ b/src/assets/icons/table.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/components/activity/ActivityTable.tsx b/src/components/activity/ActivityTable.tsx index 7c1f1935f..1da91f057 100644 --- a/src/components/activity/ActivityTable.tsx +++ b/src/components/activity/ActivityTable.tsx @@ -181,7 +181,7 @@ export const ActivityId: FC = ({ activity, size }) => { }; interface ActivityIconProps { - activity: Activity; + activity: { action: ActivityAction }; size: number; className?: string; } @@ -317,7 +317,7 @@ interface ActionIconProps { action: ActivityAction; size: string | number; } -const iconColor = (action: ActivityAction) => { +export const iconColor = (action: ActivityAction) => { if (action === 'buy') return `bg-buy/10 text-buy`; if (action === 'sell') return `bg-sell/10 text-sell`; if (action === 'create') return `bg-success/10 text-success`; @@ -325,7 +325,7 @@ const iconColor = (action: ActivityAction) => { return `bg-white/10 text-white`; }; -const ActionIcon: FC = ({ action, size }) => { +export const ActionIcon: FC = ({ action, size }) => { const className = `size-${size}`; if (action === 'create') return ; if (action === 'transfer') return ; diff --git a/src/components/common/FiatPrice.tsx b/src/components/common/FiatPrice.tsx new file mode 100644 index 000000000..5fca45673 --- /dev/null +++ b/src/components/common/FiatPrice.tsx @@ -0,0 +1,23 @@ +import { useFiatCurrency } from 'hooks/useFiatCurrency'; +import { useGetTokenPrice } from 'libs/queries'; +import { SafeDecimal } from 'libs/safedecimal'; +import { Token } from 'libs/tokens'; +import { FC } from 'react'; +import { cn, getFiatDisplayValue } from 'utils/helpers'; + +interface Props { + token?: Token; + amount: SafeDecimal | string | number; + className?: string; +} +export const FiatPrice: FC = ({ token, amount, className }) => { + const query = useGetTokenPrice(token?.address); + const { selectedFiatCurrency: currentCurrency } = useFiatCurrency(); + const loading = !token || query.isPending; + const value = new SafeDecimal(query.data?.[currentCurrency] || 0).mul(amount); + return ( + + {getFiatDisplayValue(value, currentCurrency)} + + ); +}; diff --git a/src/components/common/PairLogoName.tsx b/src/components/common/PairLogoName.tsx index 651b8f1c8..5cf8458da 100644 --- a/src/components/common/PairLogoName.tsx +++ b/src/components/common/PairLogoName.tsx @@ -34,7 +34,7 @@ const _PairLogoName: FC = ({ pair: { baseToken, quoteToken } }) => { return ( <> -

+ {baseToken.symbol} {baseToken.isSuspicious && ( @@ -44,7 +44,7 @@ const _PairLogoName: FC = ({ pair: { baseToken, quoteToken } }) => { {quoteToken.isSuspicious && ( )} -

+ ); }; diff --git a/src/components/common/radio/RadioGroup.tsx b/src/components/common/radio/RadioGroup.tsx index 852235c1d..806e2c482 100644 --- a/src/components/common/radio/RadioGroup.tsx +++ b/src/components/common/radio/RadioGroup.tsx @@ -13,7 +13,7 @@ export const RadioGroup: FC = ({ children, ...props }) => { role="group" {...props} className={cn( - 'text-14 relative flex items-center rounded-full bg-black p-2', + 'text-14 relative flex items-center rounded-full bg-black px-6 py-4', props.className )} > @@ -30,6 +30,7 @@ interface RadioProps { onChange?: (value?: string) => any; className?: string; 'data-testid'?: string; + 'aria-label'?: string; } export const Radio: FC = (props) => { @@ -45,6 +46,7 @@ export const Radio: FC = (props) => { onChange={() => props.onChange?.(props.value)} className={style.radio} data-testid={props['data-testid']} + aria-label={props['aria-label']} />