mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-05-29 22:37:44 +02:00
refactor: avoid usage of React.FC to use JSX.Element (to stay consistent)
This commit is contained in:
@ -2,7 +2,9 @@
|
||||
|
||||
import { useEffect, useRef } from 'react'
|
||||
|
||||
export const RevealFade: React.FC<React.PropsWithChildren> = (props) => {
|
||||
export type RevealFadeProps = React.PropsWithChildren
|
||||
|
||||
export const RevealFade = (props: RevealFadeProps): JSX.Element => {
|
||||
const { children } = props
|
||||
|
||||
const htmlElement = useRef<HTMLDivElement>(null)
|
||||
|
@ -1,6 +1,6 @@
|
||||
type SectionHeadingProps = React.ComponentPropsWithRef<'h2'>
|
||||
|
||||
export const SectionHeading: React.FC<SectionHeadingProps> = (props) => {
|
||||
export const SectionHeading = (props: SectionHeadingProps): JSX.Element => {
|
||||
const { children, ...rest } = props
|
||||
|
||||
return (
|
||||
|
@ -8,7 +8,7 @@ type SectionProps = React.ComponentPropsWithRef<'section'> & {
|
||||
withoutShadowContainer?: boolean
|
||||
}
|
||||
|
||||
export const Section: React.FC<SectionProps> = (props) => {
|
||||
export const Section = (props: SectionProps): JSX.Element => {
|
||||
const {
|
||||
children,
|
||||
heading,
|
||||
|
@ -2,7 +2,7 @@ import classNames from 'clsx'
|
||||
|
||||
type ShadowContainerProps = React.ComponentPropsWithRef<'div'>
|
||||
|
||||
export const ShadowContainer: React.FC<ShadowContainerProps> = (props) => {
|
||||
export const ShadowContainer = (props: ShadowContainerProps): JSX.Element => {
|
||||
const { children, className, ...rest } = props
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user