Files
lg-cxdash-front/src/components/lge-dashboard/card/Card.tsx

37 lines
915 B
TypeScript

"use client";
import type React from "react";
import { cn } from "@/lib/utils";
type Props = {
label?: string;
title?: string;
rightSlot?: React.ReactNode;
className?: string;
children: React.ReactNode;
};
export const Card = ({
label,
title,
rightSlot,
className,
children }: Props) =>
{
return (
<div className={cn("lg-category-card", className)}>
{label && <div className="lg-category-card__label">{label}</div>}
{(title || rightSlot) && (
<div className="flex items-start justify-between gap-3 pt-2">
{title && <div className="content-text-base font-semibold">{title}</div>}
{rightSlot && <div className="shrink-0">{rightSlot}</div>}
</div>
)}
<div className="pt-3">{children}</div>
</div>
);
}
export default Card;