{#snippet selectTarget(attachment: Attachment)} {/snippet} {#snippet target(attachment)} {@const render = passedTarget ?? selectTarget} {@render render?.(attachment)} {/snippet} {#each context.options as option (option)} {#if customOption}{@render customOption({ option, selected: option.value == value, })}{:else} { value = option.value await tick() element?.dispatchEvent(new Event('change', { bubbles: true })) }} size="custom" disabled={option.disabled} color="none" class={[ 'min-h-0! py-1 hover:bg-slate-100 dark:hover:bg-zinc-800', option.value == value && 'bg-slate-100 dark:bg-zinc-800 text-primary-900 dark:text-primary-100 font-medium', option.disabled && 'pointer-events-none text-slate-600 dark:text-zinc-400', option.isLabel && 'text-xs mt-2', ]} > {#if option.value == value} {:else if option.icon} {/if} {@html option.label} {/if} {/each}