feat: structure
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
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>
|
||||
);
|
||||
Reference in New Issue
Block a user