diff --git a/.changelog/2024.internal.md b/.changelog/2024.internal.md new file mode 100644 index 0000000000..e56965d3eb --- /dev/null +++ b/.changelog/2024.internal.md @@ -0,0 +1 @@ +Replace MUI Tooltip with Oasis UI Library component diff --git a/src/app/components/AccountSizeBadge/index.tsx b/src/app/components/AccountSizeBadge/index.tsx index 87e537b78b..20ece1d4b1 100644 --- a/src/app/components/AccountSizeBadge/index.tsx +++ b/src/app/components/AccountSizeBadge/index.tsx @@ -1,5 +1,5 @@ import { useTranslation } from 'react-i18next' -import Tooltip from '@mui/material/Tooltip' +import { Tooltip } from '@oasisprotocol/ui-library/src/components/tooltip' import { FC } from 'react' type AccountSizeBadgeProps = { @@ -10,7 +10,7 @@ export const AccountSizeBadge: FC = ({ size }) => { const { t } = useTranslation() return ( - +
{size}
diff --git a/src/app/components/Balance/FiatMoneyAmount.tsx b/src/app/components/Balance/FiatMoneyAmount.tsx index 594c441c17..7885f762b9 100644 --- a/src/app/components/Balance/FiatMoneyAmount.tsx +++ b/src/app/components/Balance/FiatMoneyAmount.tsx @@ -3,16 +3,13 @@ import { useTranslation } from 'react-i18next' import { FC } from 'react' import { CoinGeckoReferral } from '../CoinGeckoReferral' import { FiatValueInfo } from './hooks' -import Tooltip from '@mui/material/Tooltip' +import { Tooltip } from '@oasisprotocol/ui-library/src/components/tooltip' import { Skeleton } from '@oasisprotocol/ui-library/src/components/ui/skeleton' export const FiatMoneyWarning: FC<{ unknownTickers: string[] }> = ({ unknownTickers }) => { const { t } = useTranslation() return ( - + ) @@ -27,6 +24,7 @@ export const FiatMoneyAmount: FC = ({ }) => { const { t } = useTranslation() const hasFailed = !!unknownTickers.length + return (
diff --git a/src/app/components/BlockNavigationButtons/index.tsx b/src/app/components/BlockNavigationButtons/index.tsx index dfb24064d7..7df6256570 100644 --- a/src/app/components/BlockNavigationButtons/index.tsx +++ b/src/app/components/BlockNavigationButtons/index.tsx @@ -2,7 +2,7 @@ import { FC } from 'react' import { Link as RouterLink, useSearchParams } from 'react-router-dom' import { useTranslation } from 'react-i18next' import { PaginationNext, PaginationPrevious } from '@oasisprotocol/ui-library/src/components/pagination' -import Tooltip from '@mui/material/Tooltip' +import { Tooltip } from '@oasisprotocol/ui-library/src/components/tooltip' import { ConsensusScope, RuntimeScope, SearchScope } from '../../../types/searchScope' import { useConsensusFreshness, useRuntimeFreshness } from '../OfflineBanner/hook' import { RouteUtils } from '../../utils/route-utils' @@ -13,7 +13,7 @@ const PrevBlockButton: FC<{ scope: SearchScope; currentRound: number }> = ({ sco const [searchParams] = useSearchParams() const disabled = currentRound === 0 return ( - +
+
{ @@ -43,9 +43,12 @@ export const BlockStats = ({
{data.map(item => { const title = tooltipFormatter ? tooltipFormatter(item[dataKey].toString()) : item[dataKey] + return ( - - + +
+ +
) })} diff --git a/src/app/components/CopyToClipboard/index.tsx b/src/app/components/CopyToClipboard/index.tsx index 3102901302..21970337c7 100644 --- a/src/app/components/CopyToClipboard/index.tsx +++ b/src/app/components/CopyToClipboard/index.tsx @@ -1,6 +1,6 @@ import { FC, useCallback, useEffect, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' -import Tooltip from '@mui/material/Tooltip' +import { Tooltip } from '@oasisprotocol/ui-library/src/components/tooltip' import ContentCopyIcon from '@mui/icons-material/ContentCopy' import { COLORS } from '../../../styles/theme/colors' import { cn } from '@oasisprotocol/ui-library/src/lib/utils' @@ -39,7 +39,7 @@ export const CopyToClipboard: FC = ({ className, value }) }, []) return ( - +