Skip to content

Commit

Permalink
fix(Checkbox): 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 f07ab63 commit 8bc079f
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/checkbox/Checkbox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
import { setContext } from 'svelte';
import { twMerge } from 'tailwind-merge';
import { slide } from 'svelte/transition';
import { nanoid } from 'nanoid';
export let name: string;
export let name: string = nanoid();
export let value: string;
export let indeterminate = false;
export let disabled = false;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/checkbox/examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const checkboxProps: Prop[] = [
id: '1',
prop: 'name',
type: 'string',
default: ''
default: 'nanoid()'
},
{
id: '2',
Expand Down

0 comments on commit 8bc079f

Please sign in to comment.