• Draggable window region with minimize, maximize, and close buttons for Electron.

    Parameters

    • props: Readonly<DragWindowRegionProps>

      Component properties.

      • title

        Optional title to display in the draggable region.

    Returns Element

    Draggable region with window control buttons.

    export default function DragWindowRegion({
    title,
    }: Readonly<DragWindowRegionProps>) {
    return (
    <div className="flex w-screen items-stretch justify-between">
    <div className="draglayer w-full">
    {title && (
    <div className="flex flex-1 select-none whitespace-nowrap p-2 text-xs text-gray-400">
    {title}
    </div>
    )}
    </div>
    <WindowButtons />
    </div>
    );
    }