learning_ai_common_plat/dashboards/admin-web/src/components/PageHeader.tsx
saravanakumardb1 359d6e18a5 feat: Platform Acceleration + A/B Testing Framework
Platform Acceleration Phase 1:
- @bytelyst/sync package: Offline-first sync engine with conflict resolution
  - Storage adapters: LocalStorage, InMemory, MMKV
  - Deduplication, retry with backoff, auto-flush on reconnect
  - 12 comprehensive tests
- @bytelyst/dashboard-components package: Shared React components
  - ErrorPage, NotFoundPage, LoadingSpinner, LoadingSkeleton, EmptyState, PageHeader
  - Theme-aware with CSS custom properties

A/B Testing Framework (Complete):
- Admin UI at /ops/ab-testing with experiments list, variant performance, AI suggestions
- Sidebar navigation with Beaker icon
- 40 tests passing in ab-testing module

All 909 platform-service tests pass.
2026-03-03 19:47:47 -08:00

35 lines
1.1 KiB
TypeScript

import type { ReactNode } from 'react';
interface PageHeaderProps {
title: string;
breadcrumbs?: Array<{ label: string; href?: string }>;
actions?: ReactNode;
}
export function PageHeader({ title, breadcrumbs, actions }: PageHeaderProps): ReactNode {
return (
<div className="flex items-center justify-between mb-6">
<div>
{breadcrumbs && breadcrumbs.length > 0 && (
<nav className="flex items-center space-x-2 text-sm text-muted-foreground mb-2">
{breadcrumbs.map((crumb, index) => (
<span key={index} className="flex items-center">
{index > 0 && <span className="mx-2">/</span>}
{crumb.href ? (
<a href={crumb.href} className="hover:text-foreground">
{crumb.label}
</a>
) : (
<span>{crumb.label}</span>
)}
</span>
))}
</nav>
)}
<h1 className="text-2xl font-bold">{title}</h1>
</div>
{actions && <div className="flex items-center space-x-3">{actions}</div>}
</div>
);
}