feat: introduce style and behavior improvements

This commit is contained in:
kasia.oczkowska
2024-05-24 11:48:57 +01:00
committed by Ali BARIN
parent 737eb31776
commit f08dc25711
13 changed files with 116 additions and 53 deletions

View File

@@ -5,6 +5,8 @@ import PropTypes from 'prop-types';
import FlowStep from 'components/FlowStep';
import { StepPropType } from 'propTypes/propTypes';
import { NodeWrapper, NodeInnerWrapper } from './style.js';
function FlowStepNode({
data: {
step,
@@ -19,35 +21,37 @@ function FlowStepNode({
},
}) {
return (
<Box
maxWidth={900}
width="100vw"
<NodeWrapper
className="nodrag"
sx={{ visibility: layouted ? 'visible' : 'hidden' }}
sx={{
visibility: layouted ? 'visible' : 'hidden',
}}
>
<Handle
type="target"
position={Position.Top}
isConnectable={false}
style={{ visibility: 'hidden' }}
/>
<FlowStep
step={step}
index={index + 1}
collapsed={collapsed}
onOpen={onOpen}
onClose={onClose}
onChange={onChange}
flowId={flowId}
onContinue={openNextStep}
/>
<Handle
type="source"
position={Position.Bottom}
isConnectable={false}
style={{ visibility: 'hidden' }}
/>
</Box>
<NodeInnerWrapper>
<Handle
type="target"
position={Position.Top}
isConnectable={false}
style={{ visibility: 'hidden' }}
/>
<FlowStep
step={step}
index={index + 1}
collapsed={collapsed}
onOpen={onOpen}
onClose={onClose}
onChange={onChange}
flowId={flowId}
onContinue={openNextStep}
/>
<Handle
type="source"
position={Position.Bottom}
isConnectable={false}
style={{ visibility: 'hidden' }}
/>
</NodeInnerWrapper>
</NodeWrapper>
);
}