content.tsx 575 B

12345678910111213141516171819202122
  1. import type { FC, PropsWithChildren, ReactNode } from 'react'
  2. export type ToolTipContentProps = {
  3. title?: ReactNode
  4. action?: ReactNode
  5. } & PropsWithChildren
  6. export const ToolTipContent: FC<ToolTipContentProps> = ({
  7. title,
  8. action,
  9. children,
  10. }) => {
  11. return (
  12. <div className='w-[180px]'>
  13. {title && (
  14. <div className='mb-1.5 font-semibold text-text-secondary'>{title}</div>
  15. )}
  16. <div className='mb-1.5 text-text-tertiary'>{children}</div>
  17. {action && <div className='cursor-pointer text-text-accent'>{action}</div>}
  18. </div>
  19. )
  20. }