25 lines
555 B
TypeScript
25 lines
555 B
TypeScript
import type { HTMLAttributes, ReactNode } from 'react';
|
|
import { cn } from '../utils/cn.ts';
|
|
|
|
interface PanelProps extends HTMLAttributes<HTMLDivElement> {
|
|
glass?: boolean;
|
|
children: ReactNode;
|
|
}
|
|
|
|
export function Panel({ glass = true, className, children, ...props }: PanelProps) {
|
|
return (
|
|
<div
|
|
className={cn(
|
|
'rounded-lg border border-wing-border p-3',
|
|
glass
|
|
? 'bg-wing-glass backdrop-blur-lg'
|
|
: 'bg-wing-surface',
|
|
className,
|
|
)}
|
|
{...props}
|
|
>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|