@atlaskit/icon
Version:
An icon is a symbol representing a command, device, directory, or common action.
10 lines (9 loc) • 527 B
TypeScript
/**
* Returns an id for an SVG `<mask>` inside an animated icon's glyph, unique to this instance.
*
* `url(#id)` resolves to the first element with that id in the document, so a shared id would draw every
* instance of the icon through the first instance's mask, and animate them all together. The `useId()` value
* is stripped to characters that are safe inside `url(#…)`, since it includes `:` or non-ASCII characters
* depending on the React version.
*/
export declare const useSvgMaskId: (name: string) => string;