Files
Dune/components/help-tip.tsx
T
2026-09-08 07:37:52 +10:00

31 lines
714 B
TypeScript

'use client';
import { CircleHelp } from 'lucide-react';
import {
Popover,
PopoverContent,
PopoverTrigger,
} from '@/components/ui/popover';
import { HELP } from '@/game/reference';
export function HelpTip({ topic }: { topic: keyof typeof HELP }) {
return (
<Popover>
<PopoverTrigger
className="help-tip"
aria-label={`Help: ${topic}`}
openOnHover
delay={200}
>
<CircleHelp size={14} aria-hidden="true" />
</PopoverTrigger>
<PopoverContent
className="game-help-tooltip motion-reduce:animate-none"
aria-label={`Help: ${topic}`}
side="top"
>
{HELP[topic]}
</PopoverContent>
</Popover>
);
}