Skip to content

Commit

Permalink
feat(text-field): update field
Browse files Browse the repository at this point in the history
  • Loading branch information
andresz1 committed Jun 29, 2023
1 parent 3d818d1 commit 71508f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/text-field/src/TextField.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable complexity */

import { useId } from '@radix-ui/react-id'
import { useFormFieldState } from '@spark-ui/form-field'
import { useFormFieldControl } from '@spark-ui/form-field'
import {
InputContainerProps,
InputPrimitive,
Expand Down Expand Up @@ -48,7 +48,7 @@ export const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
const [isFocused, setIsFocused] = useState(false)
const rootRef = useRef<HTMLInputElement | null>(null)
const ref = useMergeRefs(rootRef, forwardedRef)
const field = useFormFieldState()
const field = useFormFieldControl()
const group = useInputGroup()

const intent = field.isInvalid ? 'error' : intentProp
Expand Down

0 comments on commit 71508f5

Please sign in to comment.