summaryrefslogtreecommitdiff
path: root/apps/web/src/selection/selection-box.tsx
blob: 2f2bf93318859edea31ec2491bfd9ee24a68576c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"use client";

import type { SelectionBoxBounds } from "@/selection/types";

interface SelectionBoxProps {
	bounds: SelectionBoxBounds | null;
}

export function SelectionBox({ bounds }: SelectionBoxProps) {
	if (!bounds) return null;

	return (
		<div
			style={{
				left: `${bounds.left}px`,
				top: `${bounds.top}px`,
				width: `${bounds.width}px`,
				height: `${bounds.height}px`,
			}}
			className="border-foreground/50 bg-foreground/5 pointer-events-none absolute z-50 border"
		/>
	);
}