2026-08-10 22:01:33 +00:00
|
|
|
import { Card } from "@repo/shadcn-ui/components";
|
|
|
|
|
import { cn } from "@repo/shadcn-ui/lib/utils";
|
2026-03-31 15:56:41 +00:00
|
|
|
|
|
|
|
|
import type { RightPanelProps } from "./right-panel-types.ts";
|
|
|
|
|
|
|
|
|
|
export const RightPanel = ({
|
|
|
|
|
open,
|
|
|
|
|
className,
|
|
|
|
|
children,
|
2026-08-10 22:01:33 +00:00
|
|
|
...props
|
2026-03-31 15:56:41 +00:00
|
|
|
}: RightPanelProps) => {
|
2026-08-10 22:01:33 +00:00
|
|
|
if (!open) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
2026-03-31 15:56:41 +00:00
|
|
|
|
|
|
|
|
return (
|
2026-08-10 22:01:33 +00:00
|
|
|
<Card className={cn("flex h-full min-w-0 flex-col overflow-hidden", className)} {...props}>
|
|
|
|
|
{children}
|
2026-03-31 18:13:03 +00:00
|
|
|
</Card>
|
2026-03-31 15:56:41 +00:00
|
|
|
);
|
|
|
|
|
};
|