UNPKG

@tabula/ui-selector

Version:

Selector allow users to choose a single option from a collapsible list of options when space is limited

16 lines (15 loc) 533 B
import { CSSProperties } from 'react'; import { OffsetOptions } from '@floating-ui/react'; import { ChangeVisibleHandler } from '../Selector.types'; type Options = { offset?: OffsetOptions; isVisible: boolean; onChangeVisible: ChangeVisibleHandler; }; type Result = { reference: (node: HTMLElement | null) => void; floating: (node: HTMLElement | null) => void; popupStyle: CSSProperties; }; export declare function usePopup({ offset: offsetOptions, isVisible, onChangeVisible, }: Options): Result; export {};