stargaze-studio/components/TooltipIcon.tsx

19 lines
488 B
TypeScript
Raw Normal View History

2022-07-13 13:56:36 +00:00
import { Tooltip } from 'components/Tooltip'
import type { ReactNode } from 'react'
import { FaRegQuestionCircle } from 'react-icons/fa'
import type { IconBaseProps } from 'react-icons/lib'
interface TooltipIconProps extends IconBaseProps {
label: ReactNode
}
export const TooltipIcon = ({ label, ...rest }: TooltipIconProps) => {
return (
<Tooltip label={label}>
<span>
<FaRegQuestionCircle className="cursor-help" {...rest} />
</span>
</Tooltip>
)
}