mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
feat(packages): error dialog component (#1077)
This commit is contained in:
@@ -14,5 +14,5 @@ const UNSAFE_CHARS = /[^a-zA-Z0-9_-]/g;
|
||||
*/
|
||||
export function useSafeId(prefix?: string): string {
|
||||
const raw = useId().replace(UNSAFE_CHARS, '');
|
||||
return prefix ? `${prefix}${raw}` : raw;
|
||||
return prefix ? `${prefix}-${raw}` : raw;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user