Monolieta shape
Install
# from npm
npm install --save monolieta-shape
# from yarn
yarn add monolieta-shape
Usage
Rect
import { Rect } from 'monolieta-shape';
export default function App() {
return (
<svg width="500" height="500">
<Rect x={50} y={50} width={100} height={100} />
<svg>
)
}
Props
-
backgroundBackground color -
colorLine color -
disabledDisable line changes -
edgesShow edges -
heightThe height of the rectangle -
onDragEndSubscribe to event -
onDragStartSubscribe to event -
onDragSubscribe to event -
onSelectedSubscribe to event -
opacityOpacity of the background -
widthThe width of the rectangle -
xThe x-axis coordinate -
yThe y-axis coordinate
Point
import { Point } from 'monolieta-shape';
export default function App() {
return (
<svg width="500" height="500">
<Point x={50} y={50} />
<svg>
)
}
Props
-
colorLine color -
disabledDisable line changes -
onDragEndSubscribe to event -
onDragStartSubscribe to event -
onDragSubscribe to event -
xThe x-axis coordinate -
yThe y-axis coordinate

