From 16dbb4742264edac82fa6bb8e461259d097f4437 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 14 Jan 2022 19:42:36 +0100
Subject: refactor(buttons): add a tertiary kind (previously links styles)

---
 src/components/Buttons/Button/Button.tsx | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

(limited to 'src/components/Buttons/Button/Button.tsx')

diff --git a/src/components/Buttons/Button/Button.tsx b/src/components/Buttons/Button/Button.tsx
index 4d26ea4..86e0e5b 100644
--- a/src/components/Buttons/Button/Button.tsx
+++ b/src/components/Buttons/Button/Button.tsx
@@ -1,26 +1,21 @@
-import { ButtonPosition } from '@ts/types/app';
+import { ButtonKind, ButtonPosition } from '@ts/types/app';
 import { ReactNode } from 'react';
 import styles from '../Buttons.module.scss';
 
 const Button = ({
   children,
   clickHandler,
+  kind = 'secondary',
   position = 'left',
   isDisabled = false,
-  isPrimary = false,
 }: {
   children: ReactNode;
   clickHandler: any;
+  kind?: ButtonKind;
   position?: ButtonPosition;
   isDisabled?: boolean;
-  isPrimary?: boolean;
 }) => {
-  const primaryPosition = `primary--${position}`;
-  const secondaryPosition = `secondary--${position}`;
-  const typeStyles = isPrimary
-    ? `${styles.primary} ${styles[primaryPosition]}`
-    : `${styles.secondary} ${styles[secondaryPosition]}`;
-  const classes = `${styles.btn} ${typeStyles}`;
+  const classes = `${styles.btn} ${styles[position]} ${styles[kind]}`;
 
   return (
     <button
-- 
cgit v1.2.3

