Files
cameleer-server/ui/src/components/ContentTabs.tsx
hsiegeln c06f0c89e5
Some checks failed
CI / cleanup-branch (push) Has been skipped
CI / build (push) Successful in 1m1s
CI / docker (push) Successful in 51s
CI / deploy-feature (push) Has been skipped
CI / deploy (push) Has been cancelled
feat(ui): add compact KPI metrics in tab bar (Total, Err%, Avg, P99)
New TabKpis component shows scope-aware metrics with trend arrows
aligned right in the content tab bar. Each metric shows current value
and an arrow indicating change vs previous period (green=good, red=bad).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 14:42:58 +01:00

30 lines
731 B
TypeScript

import { Tabs } from '@cameleer/design-system';
import type { TabKey, Scope } from '../hooks/useScope';
import { TabKpis } from './TabKpis';
import styles from './ContentTabs.module.css';
const TABS = [
{ label: 'Exchanges', value: 'exchanges' },
{ label: 'Dashboard', value: 'dashboard' },
{ label: 'Runtime', value: 'runtime' },
];
interface ContentTabsProps {
active: TabKey;
onChange: (tab: TabKey) => void;
scope: Scope;
}
export function ContentTabs({ active, onChange, scope }: ContentTabsProps) {
return (
<div className={styles.wrapper}>
<Tabs
tabs={TABS}
active={active}
onChange={(v) => onChange(v as TabKey)}
/>
<TabKpis scope={scope} />
</div>
);
}