From 54665b561785a234677a7e9eaed3fafd89b1de61 Mon Sep 17 00:00:00 2001 From: alter-eggo Date: Fri, 17 May 2024 17:53:02 +0400 Subject: [PATCH] feat: add link in swaps disabled tooltip --- .../pages/home/components/account-actions.tsx | 3 ++- .../swaps-disabled-tooltip-label.tsx | 18 ++++++++++++++++++ .../ui/components/tooltip/basic-tooltip.tsx | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 src/app/pages/home/components/swaps-disabled-tooltip-label.tsx diff --git a/src/app/pages/home/components/account-actions.tsx b/src/app/pages/home/components/account-actions.tsx index e350230fa61..b994bb4b87d 100644 --- a/src/app/pages/home/components/account-actions.tsx +++ b/src/app/pages/home/components/account-actions.tsx @@ -19,6 +19,7 @@ import { BasicTooltip } from '@app/ui/components/tooltip/basic-tooltip'; import { CreditCardIcon, InboxIcon, SwapIcon } from '@app/ui/icons'; import { SendButton } from './send-button'; +import { SwapsDisabledTooltipLabel } from './swaps-disabled-tooltip-label'; export function AccountActions() { const navigate = useNavigate(); @@ -55,7 +56,7 @@ export function AccountActions() { )} {whenStacksChainId(currentNetwork.chain.stacks.chainId)({ [ChainID.Mainnet]: ( - + } side="left"> + Swaps temporarily disabled + + Learn more + + + ); +} diff --git a/src/app/ui/components/tooltip/basic-tooltip.tsx b/src/app/ui/components/tooltip/basic-tooltip.tsx index e10e2d61616..d4839a1b6e4 100644 --- a/src/app/ui/components/tooltip/basic-tooltip.tsx +++ b/src/app/ui/components/tooltip/basic-tooltip.tsx @@ -6,7 +6,7 @@ import { Tooltip } from './tooltip'; interface BasicTooltipProps { children: ReactNode; - label?: string; + label?: string | ReactNode; disabled?: boolean; side?: RadixTooltip.TooltipContentProps['side']; asChild?: boolean;