✨ (editor) Actions on multiple groups
You can now select groups, move, copy, delete them easily Closes #830, closes #1092
This commit is contained in:
28
apps/builder/src/features/graph/components/SelectBox.tsx
Normal file
28
apps/builder/src/features/graph/components/SelectBox.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
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,
|
||||
}}
|
||||
/>
|
||||
)
|
||||
Reference in New Issue
Block a user