Files
bot/apps/builder/src/features/graph/components/SelectBox.tsx
Baptiste Arnaud 2c20e96a81 (editor) Actions on multiple groups
You can now select groups, move, copy, delete them easily

Closes #830, closes #1092
2024-01-23 10:31:31 +01:00

29 lines
588 B
TypeScript

import { Box } from '@chakra-ui/react'
import { Coordinates } from '../types'
import { headerHeight } from '@/features/editor/constants'
type Props = {
origin: Coordinates
dimension: {
width: number
height: number
}
}
export const SelectBox = ({ origin, dimension }: Props) => (
<Box
pos="absolute"
rounded="md"
borderWidth={1}
borderColor="blue.200"
bgColor="rgba(0, 66, 218, 0.1)"
style={{
left: origin.x,
top: origin.y - headerHeight,
width: dimension.width,
height: dimension.height,
zIndex: 1000,
}}
/>
)