diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-25 12:57:12 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-25 12:57:12 +0200 |
| commit | 8a6f09b564d5d2f02d0a2605f6b52070a910aaa3 (patch) | |
| tree | cd9e2b6ae6be75f4595b9823e67ebb6bc76df8e8 /src/components/atoms/layout | |
| parent | 782a5a1e794a9a8ef6b0b892cd3f386ed583c680 (diff) | |
chore: add a PageLayout component
Diffstat (limited to 'src/components/atoms/layout')
| -rw-r--r-- | src/components/atoms/layout/sidebar.module.scss | 5 | ||||
| -rw-r--r-- | src/components/atoms/layout/sidebar.tsx | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/components/atoms/layout/sidebar.module.scss b/src/components/atoms/layout/sidebar.module.scss index da2acbe..5d36f18 100644 --- a/src/components/atoms/layout/sidebar.module.scss +++ b/src/components/atoms/layout/sidebar.module.scss @@ -5,3 +5,8 @@ margin-top: fun.convert-px(-2); } } + +.body { + position: sticky; + top: var(--spacing-xs); +} diff --git a/src/components/atoms/layout/sidebar.tsx b/src/components/atoms/layout/sidebar.tsx index 194ed9f..d13cc0d 100644 --- a/src/components/atoms/layout/sidebar.tsx +++ b/src/components/atoms/layout/sidebar.tsx @@ -18,7 +18,11 @@ export type SidebarProps = { * Render an aside element. */ const Sidebar: FC<SidebarProps> = ({ children, className = '' }) => { - return <aside className={`${styles.wrapper} ${className}`}>{children}</aside>; + return ( + <aside className={`${styles.wrapper} ${className}`}> + <div className={styles.body}>{children}</div> + </aside> + ); }; export default Sidebar; |
