Sidebar: make it possible to set the sidebar as collapsed (#72)

* Sidebar: make it possible to set the sidebar as collapsed
This commit is contained in:
Giancarlo Buomprisco
2024-10-14 11:31:18 +02:00
committed by GitHub
parent d137df2675
commit b2c27eb25b
19 changed files with 221 additions and 100 deletions

View File

@@ -101,7 +101,7 @@ export function AccountSelector({
'dark:shadow-primary/10 group w-full min-w-0 px-2 lg:w-auto lg:max-w-fit',
{
'justify-start': !collapsed,
'justify-center': collapsed,
'm-auto justify-center px-4 lg:w-full': collapsed,
},
className,
)}
@@ -143,7 +143,11 @@ export function AccountSelector({
)}
</If>
<CaretSortIcon className="ml-2 h-4 w-4 shrink-0 opacity-50" />
<CaretSortIcon
className={cn('ml-2 h-4 w-4 shrink-0 opacity-50', {
hidden: collapsed,
})}
/>
</Button>
</PopoverTrigger>

View File

@@ -33,7 +33,7 @@ export function PersonalAccountDropdown({
className,
user,
signOutRequested,
showProfileName,
showProfileName = true,
paths,
features,
account,
@@ -56,8 +56,9 @@ export function PersonalAccountDropdown({
enableThemeToggle: boolean;
};
className?: string;
showProfileName?: boolean;
className?: string;
}) {
const { data: personalAccountData } = usePersonalAccountData(
user.id,