From c2a360fa75b9fdcc81ec53d03a994cdfd81a6435 Mon Sep 17 00:00:00 2001 From: Steven Straatemans Date: Mon, 28 Oct 2024 16:52:55 +0100 Subject: [PATCH] all functionality --- .../libs/kode-ui/.storybook/global.css.ts | 4 + .../src/components/SideBar/SideBar.tsx | 16 +- .../SideBar/components/SideBarHeader.tsx | 28 +++- .../SideBar/components/SideBarItem.tsx | 15 +- .../SideBar/components/SideBarItemsInline.tsx | 12 +- .../src/components/SideBar/style.css.ts | 143 +++++++++++++----- .../SideBarLayout/SideBarLayout.stories.tsx | 1 + 7 files changed, 160 insertions(+), 59 deletions(-) diff --git a/packages/libs/kode-ui/.storybook/global.css.ts b/packages/libs/kode-ui/.storybook/global.css.ts index 8796ec7bfe..e92a494517 100644 --- a/packages/libs/kode-ui/.storybook/global.css.ts +++ b/packages/libs/kode-ui/.storybook/global.css.ts @@ -9,3 +9,7 @@ globalStyle('pre.prismjs > div, pre.prismjs > div span, code', { globalStyle('code', { fontWeight: vars.fontWeights.$semiBold, }); + +globalStyle('body', { + padding: '0!important', +}); diff --git a/packages/libs/kode-ui/src/components/SideBar/SideBar.tsx b/packages/libs/kode-ui/src/components/SideBar/SideBar.tsx index 691d83a343..4e98ee8e1b 100644 --- a/packages/libs/kode-ui/src/components/SideBar/SideBar.tsx +++ b/packages/libs/kode-ui/src/components/SideBar/SideBar.tsx @@ -1,23 +1,23 @@ +import classNames from 'classnames'; import type { FC, PropsWithChildren, ReactElement } from 'react'; import React from 'react'; import { useSideBar } from './SideBarProvider'; -import { menuWrapperClass } from './style.css'; +import { menuWrapperClass, menuWrapperMobileExpandedClass } from './style.css'; export interface ISideBar extends PropsWithChildren { activeUrl?: string; logo?: ReactElement; } -export const SideBar: FC = ({ - children, - - activeUrl, - logo, -}) => { +export const SideBar: FC = ({ children }) => { const { isExpanded } = useSideBar(); return ( -