From 63f5b9049edb45218147db84e6dbb333f6702a34 Mon Sep 17 00:00:00 2001 From: Francis Pion Date: Wed, 20 Dec 2023 19:36:43 -0500 Subject: [PATCH] Created the AppCheckbox component. --- src/components/AppCheckbox.ts | 15 ++++++ src/components/AppCheckbox.vue | 62 +++++++++++++++++++++++ src/views/account/RecoverPasswordView.vue | 6 +-- src/views/account/RegisterView.vue | 6 +-- src/views/account/SignInView.vue | 6 +-- 5 files changed, 83 insertions(+), 12 deletions(-) create mode 100644 src/components/AppCheckbox.ts create mode 100644 src/components/AppCheckbox.vue diff --git a/src/components/AppCheckbox.ts b/src/components/AppCheckbox.ts new file mode 100644 index 0000000..6e97c6e --- /dev/null +++ b/src/components/AppCheckbox.ts @@ -0,0 +1,15 @@ +type Booleanish = boolean | "true" | "false"; + +export type CheckboxOptions = { + ariaLabel?: string; + disabled?: Booleanish; + id?: string; + inline?: Booleanish; + label?: string; + modelValue?: Booleanish; + name?: string; + required?: Booleanish; + reverse?: Booleanish; + switch?: Booleanish; + value?: string; +}; diff --git a/src/components/AppCheckbox.vue b/src/components/AppCheckbox.vue new file mode 100644 index 0000000..ffc84c5 --- /dev/null +++ b/src/components/AppCheckbox.vue @@ -0,0 +1,62 @@ + + + diff --git a/src/views/account/RecoverPasswordView.vue b/src/views/account/RecoverPasswordView.vue index 78fe4f0..b5f94f6 100644 --- a/src/views/account/RecoverPasswordView.vue +++ b/src/views/account/RecoverPasswordView.vue @@ -3,6 +3,7 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { ref } from "vue"; import { useRouter } from "vue-router"; +import AppCheckbox from "@/components/AppCheckbox.vue"; import type { RecoverPasswordPayload } from "@/types/account"; import { recoverPassword } from "@/api/account"; @@ -34,10 +35,7 @@ function onResetPassword(): void {