{#each options as option, index} {@const slctd = selected == option}
{ e.preventDefault() selected = option }} disabled={disabled[index] ?? false} type="button" > {optionNames[index] || option} {#if slctd}
{/if}
{/each}
{@render children?.({ selected })}