Files
cfw-autumn/apps/sdk-test/components/debug/DebugCard.tsx
2026-02-16 12:09:51 +00:00

36 lines
767 B
TypeScript

import type { ReactNode } from "react";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";
export const DebugCard = ({
title,
description,
actions,
children,
}: {
title: string;
description?: string;
actions?: ReactNode;
children: ReactNode;
}) => {
return (
<Card className="h-full">
<CardHeader className="flex items-start justify-between gap-3">
<div>
<CardTitle>{title}</CardTitle>
{description ? (
<CardDescription>{description}</CardDescription>
) : null}
</div>
{actions ? <div className="shrink-0">{actions}</div> : null}
</CardHeader>
<CardContent>{children}</CardContent>
</Card>
);
};