Make questionnaire Ui reusable

This commit is contained in:
Ibitoye Rotimi Best
2021-07-22 08:04:48 +03:00
parent d92d0c8a30
commit 29d3e6b7e0
16 changed files with 401 additions and 194 deletions
@@ -34,7 +34,7 @@
if (isPreview) return;
const value = getRadioVal(event.target, name);
onSubmit(name, [value]);
// event.target.reset();
event.target.reset();
}
function handlePrevious(event) {
@@ -65,12 +65,13 @@
<div class="ml-4">
{#each options as option}
<button
class="cursor-pointer text-left my-2 border-2 border-gray-300 p-2 rounded-md cursor-pointer hover:bg-gray-200 w-full {getValidationClassName(
class="cursor-pointer text-left my-2 border-2 border-gray-300 rounded-md cursor-pointer hover:bg-gray-200 w-full {getValidationClassName(
option
)}"
type="button"
>
<RadioItem
className="p-2"
{name}
value={option.id}
checked={defaultValue.includes(option.id) &&