UNPKG

react-ui89

Version:

A collection of React components that mimic a common style of user interfaces from the late 80s and early 90s.

38 lines (37 loc) 1.2 kB
import React from "react"; import "../style/text.css"; export declare enum Ui89PopoverPropsPlacement { top = "top", topStart = "topStart", topEnd = "topEnd", right = "right", rightStart = "rightStart", rightEnd = "rightEnd", bottom = "bottom", bottomStart = "bottomStart", bottomEnd = "bottomEnd", left = "left", leftStart = "leftStart", leftEnd = "leftEnd" } export interface Ui89PopoverPropsRenderContainerProps { props: React.HTMLProps<Element>; setRef: any; } export interface Ui89PopoverProps<T> { open: boolean; placement?: Ui89PopoverPropsPlacement | keyof typeof Ui89PopoverPropsPlacement; onOpenChange: (value: boolean) => void; /** * Whether to force the popover to take up as much of the available width * as possible. */ popoverOverflowForce?: boolean; /** * How large the popover can be when it takes up available width. */ popoverOverflowMaxWidth?: number; renderContainer: (props: Ui89PopoverPropsRenderContainerProps) => React.ReactNode; renderPopover: () => React.ReactNode; } export declare function Ui89Popover<T>(props: Ui89PopoverProps<T>): React.JSX.Element;