forked from jappel/leistungsbilanz-ts
Match sidebar bottom layout to the Wochenplanung reference (theme toggle + Abmelden in one row)
Square icon-only theme toggle sits next to the Abmelden button in a shared row, collapsing to just the toggle when the sidebar is collapsed - same arrangement as pm-app's Sidebar.tsx. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
c56cfb30ad
commit
8d2948cdb1
3 changed files with 38 additions and 19 deletions
|
|
@ -200,12 +200,17 @@ export function Sidebar({ isCollapsed, onToggleCollapsed }: SidebarProps) {
|
|||
<span className="sidebar-identity-name">{user.name}</span>
|
||||
</div>
|
||||
)}
|
||||
<ThemeToggle />
|
||||
{user && (
|
||||
<button type="button" className="sidebar-logout" onClick={() => void logout()}>
|
||||
{isCollapsed ? "⏻" : "Abmelden"}
|
||||
</button>
|
||||
)}
|
||||
{/* Toggle and Abmelden share one row: the toggle stays a fixed-size
|
||||
square, Abmelden takes the rest of the width. Collapsed, only
|
||||
the square toggle remains (centered). */}
|
||||
<div className="sidebar-bottom-row">
|
||||
<ThemeToggle />
|
||||
{user && !isCollapsed && (
|
||||
<button type="button" className="sidebar-logout" onClick={() => void logout()}>
|
||||
Abmelden
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue