Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.
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: 3 additions & 2 deletions src/components/primitives/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import Icon from "./Icon";
export type TooltipProps = Component<{
helper: string | React.ReactNode;
icon?: boolean;
className?: string;
}>;

export default function Tooltip({ helper, children, icon = true }: TooltipProps) {
export default function Tooltip({ helper, children, icon = true, className }: TooltipProps) {
const { vars } = useTheme();

return (
Expand All @@ -24,7 +25,7 @@ export default function Tooltip({ helper, children, icon = true }: TooltipProps)
<RadixTooltip.Portal>
<RadixTooltip.Content
style={vars}
className="select-none rounded-md bg-main-1 px-lg py-md z-30 leading-none shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] will-change-[transform,opacity] data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade max-w-[90vw] md:max-w-[70vw] lg:max-w-[40vw] xl:max-w-[30vw]"
className={`${className} select-none rounded-md bg-main-1 px-lg py-md z-30 leading-none shadow-[hsl(206_22%_7%_/_35%)_0px_10px_38px_-10px,_hsl(206_22%_7%_/_20%)_0px_10px_20px_-15px] will-change-[transform,opacity] data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade data-[state=delayed-open]:data-[side=right]:animate-slideLeftAndFade data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade max-w-[90vw] md:max-w-[70vw] lg:max-w-[40vw] xl:max-w-[30vw]`}
sideOffset={5}>
<Text size="sm" className="text-main-12">
{helper}
Expand Down