Skip to content

Commit

Permalink
fix(Toggle): 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 58ff555 commit 24429e5
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/toggle/Toggle.svelte
Expand Up @@ -6,9 +6,10 @@
export let use: ActionArray = [];
import { exclude } from '../../utils/exclude';
import { twMerge } from 'tailwind-merge';
import { nanoid } from 'nanoid';
const forwardEvents = forwardEventsBuilder(get_current_component());
export let name: string;
export let name: string = nanoid();
export let on = false;
export let error: string | undefined = undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/toggle/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 24429e5

Please sign in to comment.