Files
youtube-generator/src/components/layout/TabBar.tsx
T
poli0981andClaude Opus 4.6 a763f7c78a feat: Phase 1 MVP scaffold — core engine, i18n, UI, CI/CD
Complete Phase 1 implementation of YTDescGen:
- Project setup: Vite 5 + React 18 + TypeScript strict + Tailwind CSS dark theme
- Config layer: 7 video types, 10 genres, 7 platforms, rig/social fields
- i18n: EN/VI/JA with separate UI and template namespaces + validation script
- Core engine: title-builder, description-builder, tag-generator (pure TS, zero React)
- 42 unit tests covering all engine functions
- Zustand stores: editor + settings with localStorage persistence
- UI: 6 primitives, 11 editor components, 4 output components, 3 layout components
- Pages: Editor (form + quick preview) and Output (title/desc/tags + copy)
- CI/CD: GitHub Actions for lint/typecheck/test/build + GitHub Pages deploy

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 21:46:59 +07:00

37 lines
1.0 KiB
TypeScript

import { NavLink } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { Pencil, FileText } from "lucide-react";
import clsx from "clsx";
const tabs = [
{ to: "/", labelKey: "tabs.editor", icon: Pencil },
{ to: "/output", labelKey: "tabs.output", icon: FileText },
] as const;
export function TabBar() {
const { t } = useTranslation("ui");
return (
<nav className="flex border-b border-border bg-surface-1 px-6">
{tabs.map((tab) => (
<NavLink
key={tab.to}
to={tab.to}
end={tab.to === "/"}
className={({ isActive }) =>
clsx(
"flex items-center gap-2 border-b-2 px-4 py-2.5 text-sm font-medium transition-colors",
isActive
? "border-accent text-accent"
: "border-transparent text-text-muted hover:text-text-secondary",
)
}
>
<tab.icon className="h-4 w-4" />
{t(tab.labelKey)}
</NavLink>
))}
</nav>
);
}