-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathinput-stepper.renderer.tsx
More file actions
34 lines (32 loc) · 960 Bytes
/
input-stepper.renderer.tsx
File metadata and controls
34 lines (32 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { InputStepperShape } from '@/common/components/mock-components/front-rich-components';
import { ShapeRendererProps } from '../model';
import { ShapeModel } from '@/core/model';
export const renderInputStepper = (
shape: ShapeModel,
shapeRenderedProps: ShapeRendererProps
) => {
const { handleSelected, shapeRefs, handleDragEnd, handleTransform } =
shapeRenderedProps;
return (
<InputStepperShape
id={shape.id}
key={shape.id}
x={shape.x}
y={shape.y}
width={shape.width}
height={shape.height}
name="shape"
draggable
typeOfTransformer={shape.typeOfTransformer}
onSelected={handleSelected}
ref={shapeRefs.current[shape.id]}
onDragEnd={handleDragEnd(shape.id)}
onTransform={handleTransform}
onTransformEnd={handleTransform}
editType={shape.editType}
isEditable={true}
text={shape.text}
otherProps={shape.otherProps}
/>
);
};