Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/two-pianos-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ivao/atmosphere-react": minor
---

Make sidebar mobile responsive
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export const SidebarContainer: ComponentType<PropsWithChildren> = ({
<div className="flex flex-col items-start gap-4 px-4 py-5">
{children}
</div>
<SidebarCollapseButton />
<div className="hidden md:block">
<SidebarCollapseButton />
</div>
</aside>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const SidebarItem = ({
className={cn(
'flex shrink-0 flex-col items-start whitespace-nowrap transition-all',
isSidebarOpen
? `ml-4 ${props.isGroupOpen ? 'w-fit' : 'w-48'} opacity-100`
? `ml-4 w-fit min-w-48 opacity-100`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the goal of that change? It will change the current behavior that subitems of groups will not have a fixed width of 12rem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a fixed width and a long title or description in the sidebar item outside a group will cause them to be cut off

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I see. I am not sure whether I like a sidebar with 440px width either. Text-Wrapping looks shit as well. @wolfmaster8 do you have a (good) opinion?

: 'invisible w-0 opacity-0',
)}
>
Expand Down