Sidebar: Collapse logo when sidebar is collapsed
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { If } from '@kit/ui/if';
|
import { If } from '@kit/ui/if';
|
||||||
import { Sidebar, SidebarContent, SidebarNavigation } from '@kit/ui/sidebar';
|
import { Sidebar, SidebarContent, SidebarNavigation } from '@kit/ui/sidebar';
|
||||||
|
import { cn } from '@kit/ui/utils';
|
||||||
|
|
||||||
import { AppLogo } from '~/components/app-logo';
|
import { AppLogo } from '~/components/app-logo';
|
||||||
import { ProfileAccountDropdownContainer } from '~/components/personal-account-dropdown-container';
|
import { ProfileAccountDropdownContainer } from '~/components/personal-account-dropdown-container';
|
||||||
@@ -25,7 +26,14 @@ export function HomeSidebar(props: HomeSidebarProps) {
|
|||||||
<div className={'flex items-center justify-between space-x-2'}>
|
<div className={'flex items-center justify-between space-x-2'}>
|
||||||
<If
|
<If
|
||||||
condition={featuresFlagConfig.enableTeamAccounts}
|
condition={featuresFlagConfig.enableTeamAccounts}
|
||||||
fallback={<AppLogo className={'py-2'} />}
|
fallback={
|
||||||
|
<AppLogo
|
||||||
|
className={cn({
|
||||||
|
'max-w-full': collapsed,
|
||||||
|
'py-2': !collapsed,
|
||||||
|
})}
|
||||||
|
/>
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<HomeAccountSelector userId={user.id} accounts={accounts} />
|
<HomeAccountSelector userId={user.id} accounts={accounts} />
|
||||||
</If>
|
</If>
|
||||||
@@ -42,10 +50,7 @@ export function HomeSidebar(props: HomeSidebarProps) {
|
|||||||
|
|
||||||
<div className={'absolute bottom-4 left-0 w-full'}>
|
<div className={'absolute bottom-4 left-0 w-full'}>
|
||||||
<SidebarContent>
|
<SidebarContent>
|
||||||
<ProfileAccountDropdownContainer
|
<ProfileAccountDropdownContainer user={user} account={workspace} />
|
||||||
user={user}
|
|
||||||
account={workspace}
|
|
||||||
/>
|
|
||||||
</SidebarContent>
|
</SidebarContent>
|
||||||
</div>
|
</div>
|
||||||
</Sidebar>
|
</Sidebar>
|
||||||
|
|||||||
Reference in New Issue
Block a user