mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-12 16:37:06 +02:00
* feat: make GroupListViewer mobile-friendly with Sheet sidebar - Add Sheet component for mobile drawer behavior - Add Separator component for UI dividers - Add Sidebar component with mobile/desktop variants - Update GroupListViewer to show sheet-based sidebar on mobile (<768px) and resizable sidebar on desktop - Mobile view includes toggle button in header and auto-closes on selection * refactor: integrate sidebar toggle into ChatViewer header - Add headerPrefix prop to ChatViewer for custom header content - Pass sidebar toggle button via headerPrefix on mobile - Remove duplicate mobile header from GroupListViewer - Reduces vertical space usage by reusing ChatViewer's existing header --------- Co-authored-by: Claude <noreply@anthropic.com>
30 lines
756 B
TypeScript
30 lines
756 B
TypeScript
import * as React from "react";
|
|
import { cn } from "@/lib/utils";
|
|
|
|
interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
orientation?: "horizontal" | "vertical";
|
|
decorative?: boolean;
|
|
}
|
|
|
|
const Separator = React.forwardRef<HTMLDivElement, SeparatorProps>(
|
|
(
|
|
{ className, orientation = "horizontal", decorative = true, ...props },
|
|
ref,
|
|
) => (
|
|
<div
|
|
ref={ref}
|
|
role={decorative ? "none" : "separator"}
|
|
aria-orientation={decorative ? undefined : orientation}
|
|
className={cn(
|
|
"shrink-0 bg-border",
|
|
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
className,
|
|
)}
|
|
{...props}
|
|
/>
|
|
),
|
|
);
|
|
Separator.displayName = "Separator";
|
|
|
|
export { Separator };
|