Skip to content

Commit

Permalink
refactor: arrow function return component
Browse files Browse the repository at this point in the history
  • Loading branch information
flsilva committed Feb 6, 2024
1 parent 5b7c3aa commit ca1dfa5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/features/marketing/shared/ui/HeroCopy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { twMerge } from 'tailwind-merge';
import { ChildrenProps } from '@/features/shared/ui/ChildrenProps';
import { ClassNamePropsOptional } from '@/features/shared/ui/ClassNameProps';

export const HeroCopy = ({ children, className }: ChildrenProps & ClassNamePropsOptional) => {
return <p className={twMerge('mt-6 text-xl leading-8 text-gray-800', className)}>{children}</p>;
};
export const HeroCopy = ({ children, className }: ChildrenProps & ClassNamePropsOptional) => (
<p className={twMerge('mt-6 text-xl leading-8 text-gray-800', className)}>{children}</p>
);
12 changes: 5 additions & 7 deletions src/features/marketing/shared/ui/HeroHeading.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { ChildrenProps } from '@/features/shared/ui/ChildrenProps';

export const HeroHeading = ({ children }: ChildrenProps) => {
return (
<h1 className="text-3xl font-bold tracking-tight text-gray-900 sm:text-6xl sm:leading-tight">
{children}
</h1>
);
};
export const HeroHeading = ({ children }: ChildrenProps) => (
<h1 className="text-3xl font-bold tracking-tight text-gray-900 sm:text-6xl sm:leading-tight">
{children}
</h1>
);

0 comments on commit ca1dfa5

Please sign in to comment.