Files
DataStack/components/ui/Panel.tsx
Team Dark Devil fde2c86b1e refactor: improve auth defaults, update UI, and docs
- Provide fallback values for auth environment variables
- Refine global CSS styles and typography
- Update application metadata descriptions
- Add toast error handling to clients page
- Formalize phase implementation guidelines in AGENTS.md
2026-11-16 21:58:18 +06:00

34 lines
1016 B
TypeScript

import { cn } from '@/lib/utils';
import React from 'react';
interface PanelProps extends React.HTMLAttributes<HTMLElement> {
title: string;
action?: React.ReactNode;
meta?: string;
children: React.ReactNode;
bodyClassName?: string;
}
export const Panel: React.FC<PanelProps> = ({
title,
action,
meta,
children,
className,
bodyClassName,
...props
}) => (
<section className={cn('flex min-w-0 flex-col border border-[var(--border)] bg-[var(--surface)]', className)} {...props}>
<header className="flex min-h-8.5 items-center justify-between gap-2 border-b border-[var(--border)] px-3 py-1.5">
<h2 className="text-[11.5px] font-medium text-[var(--text)]">{title}</h2>
<div className="flex items-center gap-2.5">
{meta && <span className="font-mono text-[10.5px] tabular-nums text-[var(--text-faint)]">{meta}</span>}
{action}
</div>
</header>
<div className={cn('min-w-0', bodyClassName)}>{children}</div>
</section>
);
export default Panel;