22 lines
368 B
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)}
|