summaryrefslogtreecommitdiffstats
path: root/src/components/atoms/icons/hamburger.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-04-01 11:39:37 +0200
committerArmand Philippot <git@armandphilippot.com>2022-04-01 11:39:37 +0200
commit58005ad6ca761309eb8a92d2489030a7b1bad523 (patch)
tree727c81fdbc90bedbf78630c242734fc4a79cbed8 /src/components/atoms/icons/hamburger.tsx
parentc1b6d057ba810705789e02e45f32ad29ce383954 (diff)
chore: add a Hamburger icon component
Diffstat (limited to 'src/components/atoms/icons/hamburger.tsx')
-rw-r--r--src/components/atoms/icons/hamburger.tsx20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/components/atoms/icons/hamburger.tsx b/src/components/atoms/icons/hamburger.tsx
new file mode 100644
index 0000000..f081bf7
--- /dev/null
+++ b/src/components/atoms/icons/hamburger.tsx
@@ -0,0 +1,20 @@
+import { FC } from 'react';
+import styles from './hamburger.module.scss';
+
+type HamburgerProps = {
+ isActive: boolean;
+};
+
+/**
+ * Hamburger component
+ *
+ * Render a Hamburger icon.
+ */
+const Hamburger: FC<HamburgerProps> = ({ isActive }) => {
+ const stateClass = isActive ? `${styles['icon--active']}` : '';
+ const iconClasses = `${styles.icon} ${stateClass}`;
+
+ return <span className={iconClasses}></span>;
+};
+
+export default Hamburger;