Add UI functionality of questionnaire builder

This commit is contained in:
rotimi-best
2021-06-21 19:21:43 +03:00
parent b24b87d6d1
commit 1ceb5442bc
20 changed files with 504 additions and 5599 deletions
+21 -2
View File
@@ -3,9 +3,28 @@
export let value;
export let checked;
export let name;
export let isEditable = false;
</script>
<label class="inline-flex items-center">
<input class="form-radio" type="radio" {checked} {name} {value} />
<span class="ml-2">{label}</span>
<input
class="form-radio"
type="radio"
{checked}
{name}
{value}
disabled={isEditable}
/>
{#if isEditable}
<input
class="form-input p-2 mt-1 ml-1 block w-2/4 bg-gray-100 border-t-0 border-l-0 border-r-0 border-b-1"
type="text"
placeholder="Your option"
bind:value={label}
/>
{:else}
<span class="ml-2">{label}</span>
{/if}
<slot name="iconbutton" />
</label>