feat: multi-module iteration

This commit is contained in:
2026-08-04 21:38:49 +08:00
parent 9d96c73246
commit 71f508e02b
1366 changed files with 202004 additions and 0 deletions
@@ -0,0 +1,24 @@
type Tab = { key: string; label: string };
type OrderStatusTabsProps = {
tabs: Tab[];
active: string;
onChange: (key: string) => void;
};
export default function OrderStatusTabs({ tabs, active, onChange }: OrderStatusTabsProps) {
return (
<nav className="order-status-tabs">
{tabs.map((t) => (
<button
key={t.key}
type="button"
className={`order-status-tab${active === t.key ? ' active' : ''}`}
onClick={() => onChange(t.key)}
>
{t.label}
</button>
))}
</nav>
);
}