Skip to content

Commit

Permalink
fix: sidebar styles
Browse files Browse the repository at this point in the history
  • Loading branch information
sapkra committed Mar 13, 2024
1 parent 4913e03 commit 2ac7c4a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/fragments/sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ const renderItems = (item: SidebarProps['items'][number], option: Omit<SidebarPr
return (
<Dropdown
placement="bottom-start"
classNames={{ trigger: 'justify-start px-2' }}
isDisabled
classNames={{ trigger: option.layout === 'expanded' ? 'justify-start px-2' : 'justify-start' }}
{...item.dropdown}
>
<DropdownTrigger>
Expand Down Expand Up @@ -177,11 +176,13 @@ export const Sidebar: React.FC<SidebarProps> = ({ items, layout = 'expanded', au
}
}, [autoLayout, isMobile]);

const width = renderedLayout === 'expanded' ? 'w-72' : 'w-20 items-center'

return (
<div className="w-20 lg:w-72">
<div className={width}>
<div
// eslint-disable-next-line max-len
className="fixed flex flex-col h-screen w-20 items-center lg:w-72 lg:items-start bg-content1 px-3 py-8 gap-8 overflow-y-auto"
className={`${width} fixed flex flex-col h-screen bg-content1 px-3 py-8 gap-8 overflow-y-auto`}
>
{items.map((item) => {
const children = renderedLayout ? renderItems(item, { layout: renderedLayout, autoLayout }) : null;
Expand Down

0 comments on commit 2ac7c4a

Please sign in to comment.