From 6315efacd6212a347877102a68f430fffa4ca4ac Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Mon, 10 Jan 2022 18:17:40 +0100
Subject: refactor(sidebar): use a component to avoid styles repetition

I also fix some overflow/sticky issues.
I have to set overflow auto only when there is no button-like
links otherwise, with translate, the button is cropped on hover.
---
 src/components/Sidebar/Sidebar.tsx | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 src/components/Sidebar/Sidebar.tsx

(limited to 'src/components/Sidebar/Sidebar.tsx')

diff --git a/src/components/Sidebar/Sidebar.tsx b/src/components/Sidebar/Sidebar.tsx
new file mode 100644
index 0000000..8c9fa1d
--- /dev/null
+++ b/src/components/Sidebar/Sidebar.tsx
@@ -0,0 +1,12 @@
+import { FunctionComponent } from 'react';
+import styles from './Sidebar.module.scss';
+
+const Sidebar: FunctionComponent = ({ children }) => {
+  return (
+    <aside className={styles.wrapper}>
+      <div className={styles.body}>{children}</div>
+    </aside>
+  );
+};
+
+export default Sidebar;
-- 
cgit v1.2.3

