260127_01_ENH: 커스텀 컴포넌트들 1차 완성 및 일부페이지에 SampleData 적용

This commit is contained in:
2026-01-27 16:59:24 +09:00
parent 76c2626507
commit 8bfa8fa7c4
33 changed files with 3035 additions and 35 deletions

View File

@@ -0,0 +1,38 @@
"use client";
import {bannerType} from "@/components/lge-dashboard/types";
type BannerButtonsProps = {
banners: bannerType[];
selectedBanner: bannerType;
onSelectBanner: (banner: bannerType) => void;
};
const BannerButtons = ({
banners,
selectedBanner,
onSelectBanner
}: BannerButtonsProps) => {
return (
<div className="flex flex-col gap-2">
{banners.map((banner) => (
<button
key={banner.variable}
onClick={() => onSelectBanner(banner)}
className={`
px-4 py-2 text-sm font-medium rounded-lg transition-colors
${
selectedBanner === banner
? "bg-primary text-primary-foreground"
: "bg-gray-100 text-gray-700 hover:bg-gray-200"
}
`}
>
{banner.variableName}
</button>
))}
</div>
);
}
export default BannerButtons;