feat: inherit attrs to Textarea + fix Input label color (#245)

* feat: add more attributes to Textarea

* refactor: use `inheritAttrs` option to simplify code

* fix: `Input` label color in dark mode
This commit is contained in:
WangYK
2023-11-21 19:22:25 +08:00
committed by GitHub
parent 67091e1d90
commit a4a717f4e0
7 changed files with 147 additions and 18 deletions

View File

@@ -0,0 +1,36 @@
<template>
<div class="flex flex-col gap-y-4">
<form
id="fwb-textarea-example-form-id"
class="vp-raw"
@submit.prevent
>
<fwb-input
v-model="inputMessage"
label="Input inside the form"
placeholder="Write your message..."
/>
<fwb-button
class="mt-2"
type="submit"
>
Validate
</fwb-button>
</form>
<fwb-textarea
v-model="textareaMessage"
label="Textarea outside the form"
form="fwb-textarea-example-form-id"
minlength="20"
required
/>
</div>
</template>
<script setup>
import { ref } from 'vue'
import { FwbButton, FwbInput, FwbTextarea } from '../../../../src/index'
const inputMessage = ref('')
const textareaMessage = ref('')
</script>