UNPKG

@drivy/cobalt

Version:

Opinionated design system for Drivy's projects.

30 lines (29 loc) 1.01 kB
import React from "react"; import { TippyProps } from "@tippyjs/react"; export type PopoverPropsType = { children?: React.ReactNode; isOpen: boolean; close: () => void; "aria-label"?: string; bodySpacing?: boolean; onShow?: () => void; onHidden?: () => void; targetRef: TippyProps["reference"]; arrow?: boolean; placement?: TippyProps["placement"]; flip?: boolean; theme?: string; distance?: number; zIndex?: number; appendToBody?: boolean; fitContent?: boolean; /** * __Only for desktop popover__ * * Allow to render the content only when the popover is mounted in the DOM * Useful to render async content in the popover */ lazy?: boolean; }; declare const Popover: ({ isOpen, targetRef, close, "aria-label": ariaLabel, children, bodySpacing, onShow, onHidden, arrow, placement, flip, theme, distance, zIndex, appendToBody, fitContent, lazy, }: PopoverPropsType) => React.JSX.Element; export default Popover;