Source

adminjs-design-system/src/atoms/tooltip/tooltip-props.ts

  1. import { ReactNode, RefObject } from 'react'
  2. import { DirectionProps } from '../../utils/direction-props'
  3. import { BoxProps } from '../box/box'
  4. /**
  5. * Props passed to the {@link Tooltip} component.
  6. *
  7. * @memberof Tooltip
  8. * @alias TooltipProps
  9. */
  10. export type TooltipProps = {
  11. /** Text shown on the tooltip */
  12. title?: string,
  13. /** Direction of tooltip */
  14. direction: DirectionProps,
  15. /** Tooltip size */
  16. size?: 'default' | 'lg'
  17. }
  18. export type PortalProps = TooltipProps & {
  19. childRef: RefObject<HTMLElement>,
  20. ContentElement?: ReactNode,
  21. }
  22. export type StyledTooltipProps = BoxProps & Pick<TooltipProps, 'direction'> & {
  23. isVisible: boolean;
  24. }
  25. export default TooltipProps