Skip to content

Commit f2e40e1

Browse files
Fix component prop type naming for several components (#19)
Co-authored-by: Nick Spaargaren <[email protected]>
1 parent f858dc1 commit f2e40e1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: src/components/Form/Error/Error.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { useFormContext } from 'react-hook-form';
33

44
import styles from '../form.module.css';
55

6-
type TextInputProps = {
6+
type FormErrorProps = {
77
name: string;
88
};
99

10-
const FormError = ({ name }: TextInputProps): ReactElement => {
10+
const FormError = ({ name }: FormErrorProps): ReactElement => {
1111
const form = useFormContext();
1212

1313
const error = form.formState.errors[name];

Diff for: src/components/Form/Submit/Submit.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { ReactElement } from 'react';
22

3-
type TextInputProps = {
3+
type SubmitButtonProps = {
44
title: string;
55
isPending?: boolean;
66
};
77

8-
const SubmitButton = ({ title, isPending }: TextInputProps): ReactElement => {
8+
const SubmitButton = ({ title, isPending }: SubmitButtonProps): ReactElement => {
99
return (
1010
<button type="submit" disabled={isPending}>
1111
{title}

Diff for: src/components/Generator/GeneredTaskfile/SaveFile/SaveFile.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import {ReactElement, useState} from 'react';
44

55
import styles from './save-file.module.scss';
66

7-
type CopyProps = {
7+
type SaveFileProps = {
88
content: string;
99
};
1010

11-
const SaveFile = ({ content }: CopyProps): ReactElement => {
11+
const SaveFile = ({ content }: SaveFileProps): ReactElement => {
1212
const [isCopied, setCopied] = useState(false);
1313

1414
const copyToClipboard = (): void => {

0 commit comments

Comments
 (0)