This commit is contained in:
Alex Tran
2023-08-16 23:03:18 -05:00
parent e9acee95c1
commit 974227a95e
3 changed files with 26 additions and 23 deletions

View File

@@ -11,7 +11,7 @@
export let options: DropdownOption[] = [];
export let value = options[0];
export let icons: typeof LinkButton[] | undefined = undefined;
export let icons: (typeof LinkButton)[] | undefined = undefined;
let showMenu = false;
@@ -24,8 +24,8 @@
showMenu = false;
};
$: index = options.findIndex(option => option === value)
$: icon = icons?.[index]
$: index = options.findIndex((option) => option === value);
$: icon = icons?.[index];
</script>
<div id="dropdown-button" use:clickOutside on:outclick={handleClickOutside}>