feat(input): Setting validation status and message. (#172)

* feat(input): Setting validation status and message.

* Update src/components/Input/composables/useInputClasses.ts

* Update docs/components/input/examples/InputValidationExample.vue

* Update docs/components/input/examples/InputValidationExample.vue

* Update docs/components/input.md

* Update docs/components/input.md

---------

Co-authored-by: Ilya Artamonov <ilya.sosidka@gmail.com>
This commit is contained in:
Nguyễn Hồng Quân
2023-09-09 00:07:48 +07:00
committed by GitHub
parent df27de24d6
commit 580bf14504
9 changed files with 82 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div class="vp-raw">
<Input size="lg" placeholder="enter your search query" label="Search">
<Input v-model='name' size="lg" placeholder="enter your search query" label="Search">
<template #prefix>
<svg aria-hidden="true" class="w-5 h-5 text-gray-500 dark:text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>
</template>
@@ -11,5 +11,8 @@
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { Input, Button } from '../../../../src/index'
const name = ref('')
</script>