Skip to content

Commit

Permalink
fix(Textarea): add support for labelClass prop
Browse files Browse the repository at this point in the history
docs(Textarea): add labelClass to prop list in vuepress docs
  • Loading branch information
gretchelin authored and gravitano committed Jan 10, 2023
1 parent 9606dff commit d4212ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/components/textarea.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ const onSubmit = handleSubmit((values) => {
## Props

| Name | Type | Default |
| ----------------------------------- | ------------------ | -------------- |
|-------------------------------------| ------------------ | -------------- |
| [`modelValue`](#modelValue) | `string` | `''` |
| [`rows`](#rows) | `string \| number` | `undefined` |
| [`value`](#value) | `string` | `''` |
Expand All @@ -260,6 +260,7 @@ const onSubmit = handleSubmit((values) => {
| [`rules`](#rules) | `string` | `''` |
| [`wrapperClass`](#wrapperClass) | `string` | `''` |
| [`inputClass`](#inputClass) | `string` | `''` |
| [`labelClass`](#labelClass) | `string` | `''` |
| [`validationMode`](#validationMode) | `string` | `'aggressive'` |

## Events
Expand Down
6 changes: 5 additions & 1 deletion packages/forms/src/textarea/Textarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ const props = defineProps({
type: String,
default: '',
},
labelClass: {
type: String,
default: '',
},
validationMode: {
type: String as PropType<'aggressive' | 'eager'>,
default: 'aggressive',
Expand Down Expand Up @@ -126,7 +130,7 @@ const validationListeners = computed(() => {
wrapperClass,
]"
>
<label v-if="label" :for="name" class="v-input-label">{{ label }}</label>
<label v-if="label" :for="name" class="v-input-label" :class="labelClass">{{ label }}</label>
<textarea
:id="name"
v-model="value"
Expand Down

0 comments on commit d4212ef

Please sign in to comment.