File tree 3 files changed +6
-6
lines changed
Generator/GeneredTaskfile/SaveFile
3 files changed +6
-6
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 }
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ import {ReactElement, useState} from 'react';
4
4
5
5
import styles from './save-file.module.scss' ;
6
6
7
- type CopyProps = {
7
+ type SaveFileProps = {
8
8
content : string ;
9
9
} ;
10
10
11
- const SaveFile = ( { content } : CopyProps ) : ReactElement => {
11
+ const SaveFile = ( { content } : SaveFileProps ) : ReactElement => {
12
12
const [ isCopied , setCopied ] = useState ( false ) ;
13
13
14
14
const copyToClipboard = ( ) : void => {
You can’t perform that action at this time.
0 commit comments