2
0
Files
bot/apps/builder/components/shared/Graph/Nodes/StepNode/StepNodeOverlay.tsx
Baptiste Arnaud 524ef0812c chore(editor): ♻️ Revert tables to arrays
Yet another refacto. I improved many many mechanisms on this one including dnd. It is now end 2 end tested 🎉
2022-02-04 19:00:08 +01:00

28 lines
697 B
TypeScript

import { StackProps, HStack } from '@chakra-ui/react'
import { StartStep, Step, StepIndices } from 'models'
import { StepIcon } from 'components/editor/StepsSideBar/StepIcon'
import { StepNodeContent } from './StepNodeContent/StepNodeContent'
export const StepNodeOverlay = ({
step,
indices,
...props
}: { step: Step | StartStep; indices: StepIndices } & StackProps) => {
return (
<HStack
p="3"
borderWidth="1px"
rounded="lg"
bgColor="white"
cursor={'grab'}
w="264px"
pointerEvents="none"
shadow="lg"
{...props}
>
<StepIcon type={step.type} />
<StepNodeContent step={step} indices={indices} />
</HStack>
)
}