This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
atsebay.t/atsebayt/src/components/QuestionProposal.svelte

22 lines
368 B
Svelte

<script>
export let proposal = null;
export let kind = 'mcq';
export let value;
let inputType = 'checkbox';
$: {
switch(kind) {
case 'mcq':
inputType = 'checkbox';
break;
default:
inputType = 'radio';
}
}
</script>
<input
type={inputType}
bind:value={value}
{JSON.stringify(proposal)}