Skip to content

Commit

Permalink
Added NumberQuestionInputEditor to render on demoFormEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexthePear committed Apr 1, 2024
1 parent e12a528 commit 1159116
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ https://github.com/acmcsufoss/form/pull/new/question-input-editor -->
<BooleanQuestionInputEditor bind:data />
{:else if $$props.type === QuestionType.COLOR}
<ColorQuestionInputEditor bind:data />
{:else if $$props.type === QuestionType.NUMBER}
<NumberQuestionInputEditor {...$$props} />
<!-- {:else if $$props.type === QuestionType.TEXT}
<TextQuestionInputEditor {...$$props} />
{:else if $$props.type === QuestionType.RADIO_GROUP}
<RadioGroupQuestionInputEditor {...$$props} />
{:else if $$props.type === QuestionType.NUMBER}
<NumberQuestionInputEditor {...$$props} />
{:else if $$props.type === QuestionType.TEXTAREA}
<TextareaQuestionInputEditor {...$$props} />
{:else if $$props.type === QuestionType.DATE}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script lang="ts">
import type { NumberQuestion } from '$lib/form';
import BaseEditor from '../base/base_editor.svelte';
import NumberQuestionInput from './number_question_input.svelte';
export var data = $$props as NumberQuestion;
</script>

<BaseEditor bind:data>
<input type="number" bind:value={data.min} />
<input type="number" bind:value={data.max} />
<input type="number" bind:value={data.step} />
<input type="number" bind:value={data.value} />
<input type="text" bind:value={data.placeholder} />
<details>
<summary>Sample</summary>
<NumberQuestionInput bind:data />
</details>
</BaseEditor>

0 comments on commit 1159116

Please sign in to comment.