-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Romain Hamel <rom.hml@gmail.com> Co-authored-by: Benjamin Canac <canacb1@gmail.com> Co-authored-by: saveliy <savelii.moshkota@ext.jumingo.com>
- Loading branch information
1 parent
ff9d518
commit 2fc9385
Showing
3 changed files
with
152 additions
and
9 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
docs/components/content/examples/FormGroupErrorSlotExample.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<template> | ||
<UFormGroup label="Email" :error="!email && 'You must enter an email'" help="This is a nice email!"> | ||
<template #default="{ error }"> | ||
<UInput v-model="email" type="email" placeholder="Enter email" :trailing-icon="error ? 'i-heroicons-exclamation-triangle-20-solid' : undefined" /> | ||
</template> | ||
|
||
<template #error="{ error }"> | ||
<UAlert v-if="error" icon="i-heroicons-exclamation-triangle-20-solid" :title="error" color="red" /> | ||
<UAlert v-else icon="i-heroicons-check-circle-20-solid" title="Your email is valid" color="green" /> | ||
</template> | ||
</UFormGroup> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
const email = ref('') | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2fc9385
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ui – ./
ui-nuxt-js.vercel.app
ui.nuxt.com
ui-git-dev-nuxt-js.vercel.app