UNPKG

react-elegant-ui

Version:

Elegant UI components, made by BEM best practices for react

26 lines (25 loc) 561 B
/// <reference types="react" /> export type UIDContextValue = { /** * Context identifying name */ id: string; /** * Current id */ counter: number; }; export declare const initialContextValue: UIDContextValue; /** * Property `counter` will be mutable */ export declare const UIDContext: import("react").Context<UIDContextValue>; /** * Generate unique id * * You can use context `UIDContext` to set generator state * * @example * const id = useUniqId() */ export declare function useUniqueId(prefix?: string): string;