27 lines
664 B
TypeScript
27 lines
664 B
TypeScript
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
|
|
export const Window = ({
|
|
title,
|
|
badge,
|
|
children,
|
|
...props
|
|
}: ComponentPropsWithoutRef<'div'> & {
|
|
title: string;
|
|
badge?: ReactNode;
|
|
}) => (
|
|
<div className="modern-sk-window" {...props}>
|
|
<div className="modern-sk-titlebar">
|
|
<span className="modern-sk-traffic r" />
|
|
<span className="modern-sk-traffic y" />
|
|
<span className="modern-sk-traffic g" />
|
|
<span className="ttl">{title}</span>
|
|
{badge && (
|
|
<div style={{ marginLeft: 'auto', display: 'flex', gap: 8 }}>
|
|
{badge}
|
|
</div>
|
|
)}
|
|
</div>
|
|
{children}
|
|
</div>
|
|
);
|