260127_01_ENH: 커스텀 컴포넌트들 1차 완성 및 일부페이지에 SampleData 적용
This commit is contained in:
37
src/components/lge-dashboard/card/Card.tsx
Normal file
37
src/components/lge-dashboard/card/Card.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
"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;
|
||||
Reference in New Issue
Block a user