Skip to content

Commit

Permalink
fix(VTextField): add theme class to text field
Browse files Browse the repository at this point in the history
  • Loading branch information
SonTT19 committed Apr 13, 2024
1 parent e54966b commit b94dd57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/vuetify/src/components/VTextField/VTextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { makeVInputProps, VInput } from '@/components/VInput/VInput'
import { useFocus } from '@/composables/focus'
import { forwardRefs } from '@/composables/forwardRefs'
import { useProxiedModel } from '@/composables/proxiedModel'
import { makeThemeProps, provideTheme } from '@/composables/theme'

// Directives
import Intersect from '@/directives/intersect'
Expand Down Expand Up @@ -42,6 +43,7 @@ export const makeVTextFieldProps = propsFactory({
},
modelModifiers: Object as PropType<Record<string, boolean>>,

...makeThemeProps(),
...makeVInputProps(),
...makeVFieldProps(),
}, 'VTextField')
Expand Down Expand Up @@ -69,6 +71,7 @@ export const VTextField = genericComponent<VTextFieldSlots>()({

setup (props, { attrs, emit, slots }) {
const model = useProxiedModel(props, 'modelValue')
const { themeClasses } = provideTheme(props)
const { isFocused, focus, blur } = useFocus(props)
const counterValue = computed(() => {
return typeof props.counterValue === 'function' ? props.counterValue(model.value)
Expand Down Expand Up @@ -172,6 +175,7 @@ export const VTextField = genericComponent<VTextFieldSlots>()({
'v-input--plain-underlined': isPlainOrUnderlined.value,
},
props.class,
themeClasses.value,

This comment has been minimized.

Copy link
@johnleider

johnleider Apr 13, 2024

Member

should go before props.class

]}
style={ props.style }
{ ...rootAttrs }
Expand Down

0 comments on commit b94dd57

Please sign in to comment.