Skip to content

Commit

Permalink
feat: remove sidebar animate for smooth (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
caoxing9 committed Jun 7, 2024
1 parent 402b9a6 commit 495ca0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,17 @@ export const Sidebar: FC<PropsWithChildren<ISidebarProps>> = (props) => {
<>
{isMobile ? (
<SheetWrapper>
<div className="flex size-full flex-col overflow-hidden bg-popover">
<div className="flex size-full flex-col overflow-hidden bg-popover p-5">
<SidebarHeader headerLeft={headerLeft} />
{children}
</div>
</SheetWrapper>
) : (
<div
className={cn('transition-all flex w-0 border-r will-change-auto flex-shrink-0 h-full', {
className={cn('flex w-0 border-r flex-shrink-0 h-full', {
'overflow-hidden': !leftVisible,
'w-72': leftVisible,
})}
style={{
width: leftVisible ? `${SIDE_BAR_WIDTH}px` : '',
}}
>
<div className="flex size-full flex-col overflow-hidden bg-popover">
<SidebarHeader headerLeft={headerLeft} onExpand={() => setLeftVisible(!leftVisible)} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const SidebarHeader = (prop: ISidebarHeaderProps) => {
const { headerLeft, onExpand } = prop;

return (
<div className="m-2 flex items-center gap-1">
<div className="m-2 flex h-7 items-center gap-1">
{headerLeft}
<div className="grow basis-0" />
{onExpand && (
Expand Down

0 comments on commit 495ca0f

Please sign in to comment.