Skip to content

Commit

Permalink
fix: #1470 export classDiv
Browse files Browse the repository at this point in the history
  • Loading branch information
shinokada committed Oct 27, 2024
1 parent b9ecf4a commit fecc16e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/lib/device-mockups/Android.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
classLeftMid?: string;
classLeftBot?: string;
classRight?: string;
classSlot?: string;
}
export let div: $$Props['div'] = 'relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[14px] rounded-xl h-[600px] w-[300px] shadow-xl';
Expand All @@ -28,6 +29,7 @@
export let classLeftMid: $$Props['classLeftMid'] = '';
export let classLeftBot: $$Props['classLeftBot'] = '';
export let classRight: $$Props['classRight'] = '';
export let classSlot: $$Props['classSlot'] = '';
</script>

<div class={twMerge(div, $$props.class)}>
Expand Down
4 changes: 3 additions & 1 deletion src/lib/forms/Toggle.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
value?: string | number;
checked?: boolean;
customSize?: string;
classDiv?: string;
}
export let size: NonNullable<$$Props['size']> = 'default';
export let group: $$Props['group'] = [];
export let value: $$Props['value'] = '';
export let checked: $$Props['checked'] = undefined;
export let customSize: $$Props['customSize'] = '';
export let classDiv: string = '';
// tinted if put in component having its own background
let background: boolean = getContext('background');
Expand Down Expand Up @@ -45,7 +47,7 @@
let divClass: string;
$: divClass = twMerge(common, $$slots.offLabel ? "ms-3" : "", background ? 'dark:bg-gray-600 dark:border-gray-500' : 'dark:bg-gray-700 dark:border-gray-600', colors[($$restProps.color as FormColorType) ?? 'primary'], sizes[size], 'relative', $$props.classDiv);
$: divClass = twMerge(common, $$slots.offLabel ? "ms-3" : "", background ? 'dark:bg-gray-600 dark:border-gray-500' : 'dark:bg-gray-700 dark:border-gray-600', colors[($$restProps.color as FormColorType) ?? 'primary'], sizes[size], 'relative', classDiv);
</script>

<Checkbox custom {...$$restProps} class={$$props.class} {value} bind:checked bind:group on:click on:change>
Expand Down

0 comments on commit fecc16e

Please sign in to comment.