import type { ReactElement, ReactNode } from "react"; import { Card } from "@/components/ui/card"; import { Tabs, TabsList } from "@/components/ui/tabs"; interface TabbedCardProps { value: string; onChange: (value: string) => void; tabs: ReactElement[]; children: ReactNode; /** Legacy MUI `sx` passthroughs; retained for API compatibility (no-op). */ contentSx?: object; /** Legacy MUI `sx` passthroughs; retained for API compatibility (no-op). */ tabsSx?: object; } /** * Card surface with a line-style tab bar on top and a content area below. * * `value`/`onChange` stay string-typed (controlled) and the `tabs` prop stays * `ReactElement[]`, so consuming pages compile unchanged. The page owns the * rendered content from `children` keyed off `value`, exactly as before. */ export function TabbedCard({ value, onChange, tabs, children, }: TabbedCardProps) { return ( onChange(String(next))}>
{tabs}
{children}
); }