aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Sidebar
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-04-29 12:13:34 +0200
committerArmand Philippot <git@armandphilippot.com>2022-04-29 18:30:05 +0200
commit7e16f500cb7bc0cfd8bafbf6bb1555704f771231 (patch)
treebfc2b4a475cb06a787e2c4bdf284165644e82952 /src/components/Sidebar
parent5324664e87bedfaa01ba62c0c847ef5b861e69b3 (diff)
chore: remove old pages, components, helpers and types
Since I'm using new components, I will also rewrite the GraphQL queries so it is easier to start from scratch.
Diffstat (limited to 'src/components/Sidebar')
-rw-r--r--src/components/Sidebar/Sidebar.module.scss43
-rw-r--r--src/components/Sidebar/Sidebar.tsx40
2 files changed, 0 insertions, 83 deletions
diff --git a/src/components/Sidebar/Sidebar.module.scss b/src/components/Sidebar/Sidebar.module.scss
deleted file mode 100644
index fb6230d..0000000
--- a/src/components/Sidebar/Sidebar.module.scss
+++ /dev/null
@@ -1,43 +0,0 @@
-@use "@styles/abstracts/mixins" as mix;
-
-.wrapper {
- grid-column: 2;
-
- &--left {
- margin: var(--spacing-md) 0;
- }
-
- &--right {
- margin: var(--spacing-md) 0 0;
- }
-
- @include mix.media("screen") {
- @include mix.dimensions("md") {
- align-self: stretch;
- margin: 0 var(--spacing-xs) var(--spacing-md);
-
- &--right {
- grid-row: 2 / 4;
- grid-column: 3;
- }
- }
-
- @include mix.dimensions("lg") {
- &--left {
- grid-row: 2 / 4;
- grid-column: 1;
- }
- }
- }
-}
-
-.body {
- @include mix.media("screen") {
- @include mix.dimensions("md") {
- align-self: flex-start;
- width: 100%;
- position: sticky;
- top: var(--spacing-xs);
- }
- }
-}
diff --git a/src/components/Sidebar/Sidebar.tsx b/src/components/Sidebar/Sidebar.tsx
deleted file mode 100644
index 9e2079d..0000000
--- a/src/components/Sidebar/Sidebar.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { Children, cloneElement, isValidElement, ReactNode } from 'react';
-import styles from './Sidebar.module.scss';
-
-type SidebarPosition = 'left' | 'right';
-
-const Sidebar = ({
- children,
- position,
- ariaLabel,
- title,
-}: {
- children: ReactNode;
- position: SidebarPosition;
- ariaLabel?: string;
- title?: string;
-}) => {
- const childrenWithProps = Children.map(children, (child) => {
- if (isValidElement(child)) {
- return cloneElement(child, { titleLevel: title ? 3 : 2 });
- }
- return child;
- });
-
- const positionClass = `wrapper--${position}`;
-
- return (
- <aside
- className={`${styles.wrapper} ${styles[positionClass]}`}
- aria-label={ariaLabel}
- aria-labelledby={title ? `${position}-sidebar-title` : undefined}
- >
- <div className={styles.body}>
- {title && <h2 id={`${position}-sidebar-title`}>{title}</h2>}
- {childrenWithProps}
- </div>
- </aside>
- );
-};
-
-export default Sidebar;