import { cn } from "@/utils/ui"; import { ChevronDown } from "lucide-react"; import { useState } from "react"; interface PropertyItemProps { direction?: "row" | "column"; children: React.ReactNode; className?: string; } export function PropertyItem({ direction = "row", children, className, }: PropertyItemProps) { return (
{children}
); } export function PropertyItemLabel({ children, className, }: { children: React.ReactNode; className?: string; }) { return ( ); } export function PropertyItemValue({ children, className, }: { children: React.ReactNode; className?: string; }) { return
{children}
; } interface PropertyGroupProps { title: string; children: React.ReactNode; defaultExpanded?: boolean; className?: string; titleClassName?: string; } export function PropertyGroup({ title, children, defaultExpanded = true, className, titleClassName, }: PropertyGroupProps) { const [isExpanded, setIsExpanded] = useState(defaultExpanded); return (
setIsExpanded(!isExpanded)} > {title}
{isExpanded && {children}}
); }