Skip to content

An AI-powered search engine with a generative UI

Revert "feat: add hover icon transition to SidebarTrigger"

Yoshiki Miura7fc9d6108c22
diff --git a/components/artifact/chat-artifact-container.tsx b/components/artifact/chat-artifact-container.tsx
index 7bd71332..cbdd33fe 100644
--- a/components/artifact/chat-artifact-container.tsx
+++ b/components/artifact/chat-artifact-container.tsx
@@ -132,7 +132,7 @@ export function ChatArtifactContainer({
<div className="flex-1 min-h-0 min-w-0 h-screen flex">
<div className="absolute p-4 z-50 transition-opacity duration-1000">
{(!open || isMobileSidebar) && (
- <SidebarTrigger className="animate-fade-in" showIconLogo />
+ <SidebarTrigger className="animate-fade-in" />
)}
</div>
diff --git a/components/header.tsx b/components/header.tsx
index be4352a9..4ef7c491 100644
--- a/components/header.tsx
+++ b/components/header.tsx
@@ -22,7 +22,7 @@ export const Header: React.FC<HeaderProps> = ({ user }) => {
return (
<header
className={cn(
- 'absolute top-0 right-0 p-2 flex justify-between items-center z-10 backdrop-blur-sm lg:backdrop-blur-none bg-background/80 lg:bg-transparent transition-[width] duration-200 ease-linear',
+ 'absolute top-0 right-0 p-3 flex justify-between items-center z-10 backdrop-blur-sm lg:backdrop-blur-none bg-background/80 lg:bg-transparent transition-[width] duration-200 ease-linear',
open ? 'md:w-[calc(100%-var(--sidebar-width))]' : 'md:w-full',
'w-full'
)}
diff --git a/components/ui/sidebar.tsx b/components/ui/sidebar.tsx
index f8bc21b4..aa01bab1 100644
--- a/components/ui/sidebar.tsx
+++ b/components/ui/sidebar.tsx
@@ -11,7 +11,6 @@ import { cn } from '@/lib/utils/index'
import { useIsMobile } from '@/hooks/use-mobile'
import { Button } from '@/components/ui/button'
-import { IconLogo } from '@/components/ui/icons'
import { Input } from '@/components/ui/input'
import { Separator } from '@/components/ui/separator'
import {
@@ -302,10 +301,8 @@ Sidebar.displayName = 'Sidebar'
const SidebarTrigger = React.forwardRef<
React.ElementRef<typeof Button>,
- React.ComponentProps<typeof Button> & {
- showIconLogo?: boolean
- }
->(({ className, onClick, showIconLogo = false, ...props }, ref) => {
+ React.ComponentProps<typeof Button>
+>(({ className, onClick, ...props }, ref) => {
const { toggleSidebar } = useSidebar()
return (
@@ -314,21 +311,14 @@ const SidebarTrigger = React.forwardRef<
data-sidebar="trigger"
variant="ghost"
size="icon"
- className={cn('size-6 group', className)}
+ className={cn('size-6', className)}
onClick={event => {
onClick?.(event)
toggleSidebar()
}}
{...props}
>
- {showIconLogo ? (
- <>
- <IconLogo className="size-5 group-hover:hidden" />
- <PanelLeft className="size-5 hidden group-hover:block" />
- </>
- ) : (
- <PanelLeft size={18} />
- )}
+ <PanelLeft size={18} />
<span className="sr-only">Toggle Sidebar</span>
</Button>
)