[feat] plan 페이지 생성
This commit is contained in:
1 parent
603ea4eb35
commit
92fadede97
59 files changed
+2687
-49
No files matched your search
@@ -0,0 +1,45 @@
|
||||
import { useState } from "react";
|
||||
import { BrandConsistencyMap } from "@/components/brand/BrandConsistencyMap";
|
||||
import { SegmentTabButton } from "@/features/plan/ui/SegmentTabButton";
|
||||
import type { BrandGuide } from "@/features/plan/types/marketingPlan";
|
||||
import { BRANDING_GUIDE_TAB_ITEMS, type BrandingGuideTabKey } from "@/features/plan/ui/branding/brandingTabItems";
|
||||
import { BrandingChannelRulesTab } from "@/features/plan/ui/branding/BrandingChannelRulesTab";
|
||||
import { BrandingToneVoiceTab } from "@/features/plan/ui/branding/BrandingToneVoiceTab";
|
||||
import { BrandingVisualIdentityTab } from "@/features/plan/ui/branding/BrandingVisualIdentityTab";
|
||||
|
||||
type BrandingGuidePanelProps = {
|
||||
data: BrandGuide;
|
||||
};
|
||||
|
||||
export function BrandingGuidePanel({ data }: BrandingGuidePanelProps) {
|
||||
const [activeTab, setActiveTab] = useState<BrandingGuideTabKey>("visual");
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="flex flex-wrap gap-2 mb-8" role="tablist" aria-label="브랜딩 가이드 탭">
|
||||
{BRANDING_GUIDE_TAB_ITEMS.map((tab) => {
|
||||
const isActive = activeTab === tab.key;
|
||||
return (
|
||||
<SegmentTabButton
|
||||
key={tab.key}
|
||||
role="tab"
|
||||
aria-selected={isActive}
|
||||
title={tab.labelKr}
|
||||
active={isActive}
|
||||
onClick={() => setActiveTab(tab.key)}
|
||||
>
|
||||
{tab.label}
|
||||
</SegmentTabButton>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
|
||||
{activeTab === "visual" ? <BrandingVisualIdentityTab data={data} /> : null}
|
||||
{activeTab === "tone" ? <BrandingToneVoiceTab tone={data.toneOfVoice} /> : null}
|
||||
{activeTab === "channels" ? <BrandingChannelRulesTab channels={data.channelBranding} /> : null}
|
||||
{activeTab === "consistency" ? (
|
||||
<BrandConsistencyMap inconsistencies={data.brandInconsistencies} showHeading={false} />
|
||||
) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user