README
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
background
Background colorcolor
Line colordisabled
Disable line changesedges
Show edgesheight
The height of the rectangleonDragEnd
Subscribe to eventonDragStart
Subscribe to eventonDrag
Subscribe to eventonSelected
Subscribe to eventopacity
Opacity of the backgroundwidth
The width of the rectanglex
The x-axis coordinatey
The 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
color
Line colordisabled
Disable line changesonDragEnd
Subscribe to eventonDragStart
Subscribe to eventonDrag
Subscribe to eventx
The x-axis coordinatey
The y-axis coordinate