shadcn-vue/apps/www/src/lib/registry/new-york/example/CheckboxWithText.vue
Sadegh Barati d03067db67
feat: add vee-validate (#85)
* feat: add `vee-validate`

* chore: update

* chore: update `AccountForm` example

- add `FormDescription` component
- include `src` in tsconfig

* refactor: use radix-vue `Slot` component

* chore: refresh lockfile

* chore: update `ProfileForm.vue` and `AccountForm`

fix vee-validate initialValues on components with `componentField` slotProp

* chore: update `AppearanceForm.vue`

update pnpm and some deps -_-

* refactor: update

- add new-york style
- off eslint import/first rule
- use `useId` from radix-vue

* fix: class-name -> class

* refactor: simplify validation for `Command` component

* fix: v-bind="field" -> v-bind="componentField"

* fix: useAttrs to prevent class duplication

* docs: add `form.md`

- change TabPreview.vue to showcase way of using vee-validate

* docs: add form example for `checkbox` `input` and `datepicker`

* docs: add `combobox`, `datepicker`, `radio-group`, `select`, `switch` and `textarea` form and some other exmaples

* chore: typo, update `zod`, `vite`, and `@vitejs/plugin-vue`
2023-10-06 12:04:38 +08:00

21 lines
575 B
Vue

<script setup lang="ts">
import { Checkbox } from '@/lib/registry/new-york/ui/checkbox'
</script>
<template>
<div class="items-top flex gap-x-2">
<Checkbox id="terms1" />
<div class="grid gap-1.5 leading-none">
<label
for="terms1"
class="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
>
Accept terms and conditions
</label>
<p class="text-sm text-muted-foreground">
You agree to our Terms of Service and Privacy Policy.
</p>
</div>
</div>
</template>