File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ import { useFormContext } from 'react-hook-form';
3
3
4
4
import styles from '../form.module.css' ;
5
5
6
- type TextInputProps = {
6
+ type FormErrorProps = {
7
7
name : string ;
8
8
} ;
9
9
10
- const FormError = ( { name } : TextInputProps ) : ReactElement => {
10
+ const FormError = ( { name } : FormErrorProps ) : ReactElement => {
11
11
const form = useFormContext ( ) ;
12
12
13
13
const error = form . formState . errors [ name ] ;
Original file line number Diff line number Diff line change 1
1
import { ReactElement } from 'react' ;
2
2
3
- type TextInputProps = {
3
+ type SubmitButtonProps = {
4
4
title : string ;
5
5
isPending ?: boolean ;
6
6
} ;
7
7
8
- const SubmitButton = ( { title, isPending } : TextInputProps ) : ReactElement => {
8
+ const SubmitButton = ( { title, isPending } : SubmitButtonProps ) : ReactElement => {
9
9
return (
10
10
< button type = "submit" disabled = { isPending } >
11
11
{ title }
You can’t perform that action at this time.
0 commit comments