"use client"; import * as React from "react"; import { cn } from "./lib/utils"; export interface RowExpandItem { id: string; label: string; detail: React.ReactNode; } export interface RowExpandListProps extends React.HTMLAttributes { items: RowExpandItem[]; } /** Expandable row list: accordion details with height animation. */ export function RowExpandList({ items = [], className, ...props }: RowExpandListProps) { const [openId, setOpenId] = React.useState(null); return (
{items.map((item, idx) => { const open = openId === item.id; return (
{item.detail}
); })}
); }