Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: available balance tooltip #6044

Merged
merged 1 commit into from
Dec 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/app/ui/components/account/account.card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
shimmerStyles,
} from '@leather.io/ui';

import { useViewportMinWidth } from '@app/common/hooks/use-media-query';
import { useScaleText } from '@app/common/hooks/use-scale-text';
import { AccountNameLayout } from '@app/components/account/account-name';
import { PrivateTextLayout } from '@app/components/privacy/private-text.layout';
Expand Down Expand Up @@ -45,6 +46,8 @@ export function AccountCard({
isBalancePrivate,
}: AccountCardProps) {
const scaleTextRef = useScaleText();
const isAtLeastMd = useViewportMinWidth('md');
const tooltipSide = isAtLeastMd ? 'right' : 'bottom';

return (
<Flex
Expand Down Expand Up @@ -107,7 +110,7 @@ export function AccountCard({
Available balance:
<styled.span ml="space.01">
<BasicTooltip
side="right"
side={tooltipSide}
label="Some funds may be unavailable to protect your collectible assets. Disable protection to access your remaining balance."
>
<Flag
Expand Down
Loading