Files
bot/apps/builder/src/features/graph/components/SelectBox.tsx

29 lines
588 B
TypeScript
Raw Normal View History

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,
}}
/>
)