diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-08 19:41:40 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-08 19:41:40 +0200 |
| commit | a5df28fad0dae266a857ae110c43b3cb8b23c996 (patch) | |
| tree | a32ea390e90697dc51c3ccb9018de9da2ee4fac3 /src/components/molecules/layout/branding.tsx | |
| parent | 5c75a302c2203cb3ebf31233121026b4775662cf (diff) | |
refactor: use a consistent classname prop and avoid children prop
I was using the FunctionComponent type for some component that do not
use children. So I change the type to VoidFunctionComponent to avoid
mistakes.
I also rename all the "classes" or "additionalClasses" props to
"className" to keep consistency between each components.
Diffstat (limited to 'src/components/molecules/layout/branding.tsx')
| -rw-r--r-- | src/components/molecules/layout/branding.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/molecules/layout/branding.tsx b/src/components/molecules/layout/branding.tsx index efb2e34..9f564bf 100644 --- a/src/components/molecules/layout/branding.tsx +++ b/src/components/molecules/layout/branding.tsx @@ -1,6 +1,6 @@ import Heading from '@components/atoms/headings/heading'; import Link from 'next/link'; -import { FC } from 'react'; +import { VFC } from 'react'; import { useIntl } from 'react-intl'; import styles from './branding.module.scss'; import FlippingLogo from './flipping-logo'; @@ -33,7 +33,7 @@ type BrandingProps = { * * Render the branding logo, title and optional baseline. */ -const Branding: FC<BrandingProps> = ({ +const Branding: VFC<BrandingProps> = ({ baseline, isHome = false, photo, @@ -61,7 +61,7 @@ const Branding: FC<BrandingProps> = ({ return ( <div className={styles.wrapper}> <FlippingLogo - additionalClasses={styles.logo} + className={styles.logo} altText={altText} logoTitle={logoTitle} photo={photo} @@ -70,7 +70,7 @@ const Branding: FC<BrandingProps> = ({ isFake={!isHome} level={1} withMargin={false} - additionalClasses={styles.title} + className={styles.title} > {withLink ? ( <Link href="/"> @@ -85,7 +85,7 @@ const Branding: FC<BrandingProps> = ({ isFake={true} level={4} withMargin={false} - additionalClasses={styles.baseline} + className={styles.baseline} > {baseline} </Heading> |
