diff --git a/packages/@mantine/hooks/src/utils/random-id/random-id.ts b/packages/@mantine/hooks/src/utils/random-id/random-id.ts index dd91457b364..1f480784b92 100644 --- a/packages/@mantine/hooks/src/utils/random-id/random-id.ts +++ b/packages/@mantine/hooks/src/utils/random-id/random-id.ts @@ -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)}`; }