UNPKG

@spark-web/date-picker

Version:

--- title: DatePicker storybookPath: forms-date-picker isExperimentalPackage: true ---

15 lines (14 loc) 593 B
import type { RefObject } from 'react'; /** * Useful for situations where you have separate buttons to open/close * or expand/collapse an element. */ export declare function useTernaryState(initialValue: boolean | (() => boolean)): [boolean, SetTrue, SetFalse]; declare type SetTrue = () => void; declare type SetFalse = () => void; /** * Calls the provided handler function if a click is detected outside of a * specified element. */ export declare function useClickOutside<T extends HTMLElement = HTMLElement>(ref: RefObject<T>, handler: (event: MouseEvent) => void): void; export {};