Skip to content

Commit b2f4453

Browse files
authored
Merge pull request #59 from significa/fix/multi
fix: classname
2 parents 21f3e36 + c18d888 commit b2f4453

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/components/forms/multi-select.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import Icon, { type IconOptions } from '../icon.svelte';
55
import type { ListboxOption } from '@melt-ui/svelte/dist/builders/listbox/types';
66
import { fly } from 'svelte/transition';
7+
import clsx from 'clsx';
78
89
const {
910
elements: { trigger, menu, option },
@@ -19,6 +20,8 @@
1920
multiple: true
2021
});
2122
23+
let className: undefined | string = undefined;
24+
export { className as class };
2225
export let icon: undefined | IconOptions = undefined;
2326
export let options: string[] = [];
2427
export let selected: ListboxOption<string>[] | undefined = [];
@@ -27,7 +30,7 @@
2730
$: meltSelected.set(selected);
2831
</script>
2932

30-
<div class="flex flex-col gap-1">
33+
<div class={clsx('flex flex-col gap-1', className)}>
3134
<button
3235
class="flex h-12 min-w-[220px] items-center justify-between rounded-sm border border-background-offset bg-background-panel px-5 py-2 text-sm font-semibold hover:opacity-90 hover:transition-all focus:border-border-active focus:outline-none focus:ring-4 focus:ring-outline focus:transition-all"
3336
{...$trigger}

0 commit comments

Comments
 (0)