From cce0971ec858f17f2c2cdd4b87962ee5d109c53c Mon Sep 17 00:00:00 2001 From: toniocodo Date: Sun, 1 Oct 2023 12:33:19 +0200 Subject: [PATCH] fix: feedback round 2 - label capitalization - update options in trailing options - add tooltip for price tolerance --- .../history/src/components/APYContainer.tsx | 2 +- .../history/src/components/HistoryCard.tsx | 2 +- .../oeth/shared/src/components/GasPopover.tsx | 14 ++++++++-- libs/oeth/swap/src/components/ApyHeader.tsx | 28 ++++++++++--------- .../components/src/InfoTooltip/index.tsx | 8 +++++- 5 files changed, 36 insertions(+), 18 deletions(-) diff --git a/libs/oeth/history/src/components/APYContainer.tsx b/libs/oeth/history/src/components/APYContainer.tsx index 3b5e28f5e..a78598026 100644 --- a/libs/oeth/history/src/components/APYContainer.tsx +++ b/libs/oeth/history/src/components/APYContainer.tsx @@ -53,7 +53,7 @@ export function APYContainer() { - {intl.formatMessage({ defaultMessage: 'OETH transactions' })} + {intl.formatMessage({ defaultMessage: 'OETH Transactions' })} - + {intl.formatMessage({ defaultMessage: 'Price Tolerance' })} + diff --git a/libs/oeth/swap/src/components/ApyHeader.tsx b/libs/oeth/swap/src/components/ApyHeader.tsx index 04c01e999..d2bffbfcc 100644 --- a/libs/oeth/swap/src/components/ApyHeader.tsx +++ b/libs/oeth/swap/src/components/ApyHeader.tsx @@ -94,19 +94,21 @@ export const ApyHeader = (props: StackProps) => { }} MenuListProps={{ dense: true }} > - {trailingOptions.map((t) => ( - { - setTrailing(t); - setAnchorEl(null); - }} - > - {intl.formatMessage(t.label)} - - ))} + {trailingOptions + .filter((t) => t.value !== trailing.value) + .map((t) => ( + { + setTrailing(t); + setAnchorEl(null); + }} + > + {intl.formatMessage(t.label)} + + ))} diff --git a/libs/shared/components/src/InfoTooltip/index.tsx b/libs/shared/components/src/InfoTooltip/index.tsx index c625bb3c9..94bc25eb7 100644 --- a/libs/shared/components/src/InfoTooltip/index.tsx +++ b/libs/shared/components/src/InfoTooltip/index.tsx @@ -1,15 +1,18 @@ import { Box, Tooltip, Typography } from '@mui/material'; +import type { BoxProps } from '@mui/material'; + export type InfoTooltipProps = { tooltipLabel: string; iconSize?: number; iconColor?: string; -}; +} & BoxProps; export function InfoTooltip({ tooltipLabel, iconSize = 12, iconColor = 'text.secondary', + ...rest }: InfoTooltipProps) { return ( theme.typography.pxToRem(iconSize), height: (theme) => theme.typography.pxToRem(iconSize), color: iconColor, + + ...rest?.sx, }} >