UNPKG

react-ui89

Version:

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

34 lines (33 loc) 1.09 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; /** * How large the popover can be if there if the viewport is larger than the * width of the container. */ popoverOverflowMaxWidth?: number; renderContainer: (props: Ui89PopoverPropsRenderContainerProps) => React.ReactNode; renderPopover: () => React.ReactNode; } export declare function Ui89Popover<T>(props: Ui89PopoverProps<T>): React.JSX.Element;