mirror of
https://github.com/nimbold/Firelink.git
synced 2026-07-26 12:08:27 +00:00
20 lines
460 B
TypeScript
20 lines
460 B
TypeScript
import { getCurrentWindow } from '@tauri-apps/api/window';
|
|
|
|
interface WindowDragRegionProps {
|
|
className?: string;
|
|
}
|
|
|
|
export function WindowDragRegion({ className = '' }: WindowDragRegionProps) {
|
|
return (
|
|
<div
|
|
className={`h-10 shrink-0 cursor-default ${className}`}
|
|
data-tauri-drag-region
|
|
onPointerDown={(event) => {
|
|
if (event.button === 0) {
|
|
void getCurrentWindow().startDragging();
|
|
}
|
|
}}
|
|
/>
|
|
);
|
|
}
|