@wikimedia/codex
Version:
Codex Design System for Wikimedia
18 lines (17 loc) • 640 B
TypeScript
/**
* DEPRECATED: Use Vue's useId() instead.
*
* Get a unique ID suitable for use in HTML templates.
*
* All strings begin with the library prefix "cdx-". If an optional identifier
* string is provided, that is included as well. Alternatively, if an "id"
* element is present on the calling component as either a prop or attribute,
* that will be used if no identifier argument is provided. All strings include
* a numerical suffix based on an auto-incrementing counter to ensure
* uniqueness.
*
* @deprecated
* @param identifier
* @return Generated ID
*/
export default function useGeneratedId(identifier?: string): string;