Skip to content

Commit

Permalink
really commit
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Jan 8, 2024
1 parent 3a61b75 commit d1714ef
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/addons/dispatch/fields/Select.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script lang="ts">
import Field from "./Field.svelte";
export let title: string;
export let name: string;
export let defaultValue: string = "";
export let value: string = defaultValue || null;
export let required: boolean = false;
export let description: string = "";
export let inline = false;
export let choices: string[] = [];
</script>

<Field {title} {description} {inline} {required}>
<select {name} {value}>
{#if !required}
<option value="">---</option>
{/if}
{#each choices as choice}
<option value={choice}>{choice}</option>
{/each}
</select>
</Field>

0 comments on commit d1714ef

Please sign in to comment.