Files
Frontend/src/app/components/card.tsx
Liam 18a782243e
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m9s
move common dir
2024-04-20 02:35:52 +01:00

30 lines
731 B
TypeScript

import { Card as ShadcnCard, CardContent } from "@/app/components/ui/card";
import { cn } from "@/app/common/utils";
import { ReactElement } from "react";
import { type ClassValue } from "clsx";
type CardProps = {
/**
* The children for this element.
*/
children: React.ReactNode;
/**
* The class names for the card.
*/
classNameCard?: ClassValue;
/**
* The class names for the content.
*/
classNameContent?: ClassValue;
};
export function Card({ children, classNameCard, classNameContent }: CardProps): ReactElement {
return (
<ShadcnCard className={cn("p-1.5", classNameCard)}>
<CardContent className={cn("p-1.5", classNameContent)}>{children}</CardContent>
</ShadcnCard>
);
}