From 6e2a66ca0f12e11c66d993ed22624cd4659b5f2e Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Thu, 16 Dec 2021 17:34:41 +0100
Subject: chore: define secondary button styles

I also rename submit style to primary.
---
 src/components/Buttons/Button/Button.tsx | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 src/components/Buttons/Button/Button.tsx

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

diff --git a/src/components/Buttons/Button/Button.tsx b/src/components/Buttons/Button/Button.tsx
new file mode 100644
index 0000000..c186d2a
--- /dev/null
+++ b/src/components/Buttons/Button/Button.tsx
@@ -0,0 +1,31 @@
+import { ReactNode } from 'react';
+import styles from '../Buttons.module.scss';
+
+const Button = ({
+  children,
+  clickHandler,
+  isDisabled = false,
+  isPrimary = false,
+}: {
+  children: ReactNode;
+  clickHandler: any;
+  isDisabled: boolean;
+  isPrimary?: boolean;
+}) => {
+  const classes = `${styles.btn} ${
+    isPrimary ? styles.primary : styles.secondary
+  }`;
+
+  return (
+    <button
+      className={classes}
+      type="button"
+      disabled={isDisabled}
+      onClick={clickHandler}
+    >
+      {children}
+    </button>
+  );
+};
+
+export default Button;
-- 
cgit v1.2.3

