UNPKG

@patreon/studio

Version:

Patreon Studio Design System

10 lines (9 loc) 367 B
/** * Given a prefix `name`, returns `name-id` where `id` is a number sequentially * incremented for each component instance, starting with `0`. * * @example * const id = useSequentialId('MyComponent') // returns `MyComponent-0` */ export declare function useSequentialId(prefix: string): string | undefined; export declare function clearSequentialIds(): void;