Skip to content

Commit

Permalink
Fix component prop type naming for several components (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Spaargaren <[email protected]>
  • Loading branch information
nickspaargaren and nickspaargaren authored Dec 6, 2024
1 parent f858dc1 commit f2e40e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/Form/Error/Error.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions src/components/Form/Submit/Submit.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<button type="submit" disabled={isPending}>
{title}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import {ReactElement, useState} from 'react';

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

type CopyProps = {
type SaveFileProps = {
content: string;
};

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

const copyToClipboard = (): void => {
Expand Down

0 comments on commit f2e40e1

Please sign in to comment.