From 7255d25f6834a208c0ed44636356cc260f6ab6ba Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 27 Sep 2023 17:38:23 +0200
Subject: refactor(components): rewrite Heading component

* remove `alignment` and `withMargin` props (consumer should handle
that)
* move styles to Sass placeholders to avoid repeats with headings
coming from WordPress
* refactor some other components that depend on Heading to avoid ESlint
errors
---
 src/components/molecules/layout/branding.tsx | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

(limited to 'src/components/molecules/layout/branding.tsx')

diff --git a/src/components/molecules/layout/branding.tsx b/src/components/molecules/layout/branding.tsx
index b105796..981da74 100644
--- a/src/components/molecules/layout/branding.tsx
+++ b/src/components/molecules/layout/branding.tsx
@@ -1,5 +1,5 @@
 import Link from 'next/link';
-import { FC, useRef } from 'react';
+import { type FC, useRef } from 'react';
 import { useIntl } from 'react-intl';
 import { useStyles } from '../../../utils/hooks';
 import { Heading } from '../../atoms';
@@ -90,7 +90,6 @@ export const Branding: FC<BrandingProps> = ({
         className={styles.title}
         isFake={!isHome}
         level={1}
-        withMargin={false}
         ref={titleRef}
       >
         {withLink ? (
@@ -101,17 +100,11 @@ export const Branding: FC<BrandingProps> = ({
           title
         )}
       </Heading>
-      {baseline && (
-        <Heading
-          className={styles.baseline}
-          isFake={true}
-          level={4}
-          withMargin={false}
-          ref={baselineRef}
-        >
+      {baseline ? (
+        <Heading className={styles.baseline} isFake level={4} ref={baselineRef}>
           {baseline}
         </Heading>
-      )}
+      ) : null}
     </div>
   );
 };
-- 
cgit v1.2.3

