Skip to content

Commit

Permalink
fix(RadioGroup): name now defaults to nanoid()
Browse files Browse the repository at this point in the history
  • Loading branch information
N00nDay committed Nov 13, 2023
1 parent 2f79ee7 commit 2a598b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib/components/radio/RadioGroup.svelte
Expand Up @@ -3,8 +3,9 @@
import { setContext, onMount } from 'svelte';
import { writable } from 'svelte/store';
import { slide } from 'svelte/transition';
import { nanoid } from 'nanoid';
export let name: string;
export let name: string = nanoid();
export let type: 'default' | 'pill' = 'default';
export let selected: string | undefined = undefined;
export let error: string | undefined = undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/radio/examples.ts
Expand Up @@ -5,7 +5,7 @@ export const props: Prop[] = [
id: '1',
prop: 'name',
type: 'string',
default: ''
default: 'nanoid()'
},
{
id: '2',
Expand Down

0 comments on commit 2a598b5

Please sign in to comment.