Files
Frontend/src/app/components/card.tsx

24 lines
523 B
TypeScript
Raw Normal View History

2024-04-18 08:51:52 +01:00
import { CardContent, Card as ShadcnCard } from "@/app/components/ui/card";
2024-04-16 22:50:42 +01:00
import { cn } from "@/common/utils";
2024-04-18 03:51:41 +01:00
import { ReactElement } from "react";
2024-04-16 22:50:42 +01:00
2024-04-18 07:06:16 +01:00
type CardProps = {
/**
* The children for this element.
*/
2024-04-15 09:09:45 +01:00
children: React.ReactNode;
2024-04-18 07:06:16 +01:00
/**
* The class names to append.
*/
2024-04-16 22:50:42 +01:00
className?: string;
2024-04-18 07:06:16 +01:00
};
export function Card({ children, className }: CardProps): ReactElement {
2024-04-18 08:51:52 +01:00
return (
<ShadcnCard className={cn(className, "pt-4")}>
<CardContent>{children}</CardContent>
</ShadcnCard>
);
2024-04-15 09:09:45 +01:00
}