-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28c561d
commit cdd754c
Showing
14 changed files
with
121 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"editor.insertSpaces": true, | ||
"editor.tabSize": 2, | ||
"files.eol": "\n", | ||
"[svelte]": { | ||
"editor.defaultFormatter": "svelte.svelte-vscode" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 0 additions & 36 deletions
36
src/lib/components/form/question_input_editor/question_base_input.svelte
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/lib/components/form_editor/question_input_editor/question_base_input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<script lang="ts"> | ||
import type { QuestionBase } from '$lib/form'; | ||
import { QuestionType } from '$lib/form'; | ||
import QuestionInput from '$lib/components/question_input/question_input.svelte'; | ||
export let value: QuestionBase; | ||
</script> | ||
|
||
<input type="hidden" name="type" value={value.type} /> | ||
|
||
<QuestionInput | ||
type={QuestionType.TEXT} | ||
name="name" | ||
content="The unique identifier for the question." | ||
bind:value={value.name} | ||
/> | ||
|
||
<QuestionInput | ||
type={QuestionType.TEXTAREA} | ||
name="content" | ||
content="The markdown question content for the form field." | ||
bind:value={value.content} | ||
/> | ||
|
||
<QuestionInput | ||
type={QuestionType.BOOLEAN} | ||
name="required" | ||
content="Whether or not the form field is required." | ||
bind:value={value.required} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<script lang="ts"> | ||
import type { Question } from '$lib/form'; | ||
import QuestionInput from './question_input.svelte'; | ||
export const data: Question[] = []; | ||
</script> | ||
|
||
{#each data as question (question.name)} | ||
<QuestionInput {...question} /> | ||
{:else} | ||
<slot /> | ||
{/each} |
Oops, something went wrong.