Skip to content

Commit 3c5662a

Browse files
authored
fix: use standard checkbox for RSVP (#50)
The current checkbox design is unclear on whether it's selected or deselected on the initial RSVP. Switching to regular checkboxes to make it more clear.
1 parent 48a51a5 commit 3c5662a

3 files changed

Lines changed: 11 additions & 43 deletions

File tree

app/components/form/FormCheckbox.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
:id
55
v-model="model"
66
type="checkbox"
7+
:name
8+
:value
79
class="size-5 rounded border-2 border-foreground accent-accent cursor-pointer"
810
/>
911
<label :for="id" class="text-lg font-semibold cursor-pointer select-none">
@@ -13,10 +15,12 @@
1315
</template>
1416

1517
<script setup lang="ts">
16-
const model = defineModel<boolean>();
18+
const model = defineModel<boolean | string[]>();
1719
const id = useId();
1820
19-
const { label } = defineProps<{
21+
const { label, name, value } = defineProps<{
2022
label: string;
23+
name?: string;
24+
value?: string;
2125
}>();
2226
</script>

app/components/form/RsvpCheckbox.vue

Lines changed: 0 additions & 36 deletions
This file was deleted.

app/components/form/rsvp/StepHousehold.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@
1010
@secondary="rsvpStore.reset()"
1111
>
1212
<fieldset class="flex flex-col gap-y-4">
13-
<RsvpCheckbox
13+
<FormCheckbox
1414
v-if="rsvpStore.self"
1515
v-model="rsvpStore.attendingIds"
1616
:label="rsvpStore.self.displayName"
1717
:value="rsvpStore.self.id"
1818
name="attending"
1919
/>
20-
<RsvpCheckbox
20+
<FormCheckbox
2121
v-for="guest in rsvpStore.guests"
2222
:key="guest.id"
2323
v-model="rsvpStore.attendingIds"
2424
:label="guest.displayName"
2525
:value="guest.id"
2626
name="attending"
2727
/>
28-
<p class="text-sm font-bold -mt-2 text-center">
29-
{{ message }}
30-
</p>
3128
</fieldset>
29+
<p class="text-sm font-bold">
30+
{{ message }}
31+
</p>
3232
<FormInput
3333
v-if="rsvpStore.anonymousGuest"
3434
v-model="rsvpStore.plusOneName"

0 commit comments

Comments
 (0)