import { Popover as ChakraPopover, IconButton, type IconButtonProps, Portal, Tooltip as ChakraTooltip } from "@chakra-ui/react" import * as React from "react" import { HiOutlineInformationCircle } from "react-icons/hi" export interface ToggleTipProps extends ChakraPopover.RootProps { showArrow?: boolean portalled?: boolean portalRef?: React.RefObject content?: React.ReactNode contentProps?: ChakraPopover.ContentProps } export const ToggleTip = React.forwardRef( function ToggleTip(props, ref) { const { showArrow, children, portalled = true, content, contentProps, portalRef, ...rest } = props return ( {children} {showArrow && ( )} {content} ) }, ) export interface InfoTipProps extends Partial { buttonProps?: IconButtonProps | undefined } export const InfoTip = React.forwardRef( function InfoTip(props, ref) { const { children, buttonProps, ...rest } = props return ( ) }, ) export interface TooltipProps extends ChakraTooltip.RootProps { showArrow?: boolean portalled?: boolean portalRef?: React.RefObject content: React.ReactNode contentProps?: ChakraTooltip.ContentProps disabled?: boolean } export const Tooltip = React.forwardRef( function Tooltip(props, ref) { const { showArrow, children, disabled, portalled = true, content, contentProps, portalRef, ...rest } = props if (disabled) return children return ( {children} {showArrow && ( )} {content} ) }, )