UNPKG

@jengaui/utils

Version:

Jenga UI Utils component in React

18 lines (16 loc) 550 B
/** * If a default is not provided, generate an id. * @param defaultId - Default component id. */ declare function useId(defaultId?: any): string; /** * Merges two ids. * Different ids will trigger a side-effect and re-render components hooked up with `useId`. */ declare function mergeIds(idA: any, idB: any): any; /** * Used to generate an id, and after render, check if that id is rendered so we know * if we can use it in places such as labelledby. */ declare function useSlotId(): string | null; export { mergeIds, useId, useSlotId };