From f2e40e145fc4dfbe64329a57cc926dd25adae141 Mon Sep 17 00:00:00 2001 From: Nick Spaargaren <20847106+nickspaargaren@users.noreply.github.com> Date: Fri, 6 Dec 2024 22:36:00 +0100 Subject: [PATCH] Fix component prop type naming for several components (#19) Co-authored-by: Nick Spaargaren --- src/components/Form/Error/Error.tsx | 4 ++-- src/components/Form/Submit/Submit.tsx | 4 ++-- .../Generator/GeneredTaskfile/SaveFile/SaveFile.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Form/Error/Error.tsx b/src/components/Form/Error/Error.tsx index 5c2da85..9d1dafb 100644 --- a/src/components/Form/Error/Error.tsx +++ b/src/components/Form/Error/Error.tsx @@ -3,11 +3,11 @@ import { useFormContext } from 'react-hook-form'; import styles from '../form.module.css'; -type TextInputProps = { +type FormErrorProps = { name: string; }; -const FormError = ({ name }: TextInputProps): ReactElement => { +const FormError = ({ name }: FormErrorProps): ReactElement => { const form = useFormContext(); const error = form.formState.errors[name]; diff --git a/src/components/Form/Submit/Submit.tsx b/src/components/Form/Submit/Submit.tsx index 5dfc08d..97d6da6 100644 --- a/src/components/Form/Submit/Submit.tsx +++ b/src/components/Form/Submit/Submit.tsx @@ -1,11 +1,11 @@ import { ReactElement } from 'react'; -type TextInputProps = { +type SubmitButtonProps = { title: string; isPending?: boolean; }; -const SubmitButton = ({ title, isPending }: TextInputProps): ReactElement => { +const SubmitButton = ({ title, isPending }: SubmitButtonProps): ReactElement => { return (