From d177e0c7c61845b516d4a361a21739bb6486b9b5 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 1 Apr 2022 19:03:42 +0200
Subject: chore: add a back to top component

---
 src/components/atoms/buttons/button-link.tsx | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

(limited to 'src/components/atoms/buttons/button-link.tsx')

diff --git a/src/components/atoms/buttons/button-link.tsx b/src/components/atoms/buttons/button-link.tsx
index c33a4b7..47fe4b0 100644
--- a/src/components/atoms/buttons/button-link.tsx
+++ b/src/components/atoms/buttons/button-link.tsx
@@ -15,6 +15,10 @@ type ButtonLinkProps = {
    * ButtonLink kind. Default: secondary.
    */
   kind?: 'primary' | 'secondary';
+  /**
+   * ButtonLink shape. Default: rectangle.
+   */
+  shape?: 'rectangle' | 'square';
   /**
    * Define an URL as target.
    */
@@ -30,18 +34,26 @@ const ButtonLink: FC<ButtonLinkProps> = ({
   children,
   target,
   kind = 'secondary',
+  shape = 'rectangle',
   external = false,
   ...props
 }) => {
   const kindClass = styles[`btn--${kind}`];
+  const shapeClass = styles[`btn--${shape}`];
 
   return external ? (
-    <a href={target} className={`${styles.btn} ${kindClass}`} {...props}>
+    <a
+      href={target}
+      className={`${styles.btn} ${kindClass} ${shapeClass}`}
+      {...props}
+    >
       {children}
     </a>
   ) : (
-    <Link href={target} {...props}>
-      <a className={`${styles.btn} ${kindClass}`}>{children}</a>
+    <Link href={target}>
+      <a className={`${styles.btn} ${kindClass} ${shapeClass}`} {...props}>
+        {children}
+      </a>
     </Link>
   );
 };
-- 
cgit v1.2.3

