Files
nodarium/packages/ui/src/lib/inputs/InputSelect.svelte
release-bot c7f808ce2d wip
2026-02-08 22:56:41 +01:00

26 lines
523 B
Svelte

<script lang="ts">
interface Props {
options?: string[];
value?: number;
id?: string;
}
let { options = [], value = $bindable(0), id = '' }: Props = $props();
</script>
<select {id} bind:value class="bg-layer-2 text-text">
{#each options as label, i (label)}
<option value={i}>{label}</option>
{/each}
</select>
<style>
select {
font-family: var(--font-family);
outline: solid 1px var(--color-outline);
padding: 0.5em 0.8em;
border-radius: 5px;
border: none;
}
</style>