Skip to content

Commit

Permalink
[@mantine/hooks] Add option to specify prefix in randonId function
Browse files Browse the repository at this point in the history
  • Loading branch information
rtivital committed Dec 12, 2024
1 parent ca0ad13 commit a6d4b29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@mantine/hooks/src/utils/random-id/random-id.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function randomId() {
return `mantine-${Math.random().toString(36).slice(2, 11)}`;
export function randomId(prefix = 'mantine-'): string {
return `${prefix}${Math.random().toString(36).slice(2, 11)}`;
}

0 comments on commit a6d4b29

Please sign in to comment.