1- <p align = " center " >
1+ <p style = " text-align : center ; " >
22 <img src =" https://i.imgur.com/ajs39FC.png " height =" 150 " alt =" React Sketch Canvas " />
33</p >
44<br />
5- <h3 align = " center " >
5+ <h3 style = " text-align : center ; " >
66 Freehand vector drawing component for React using SVG as canvas 🖌
77</h3 >
88<br />
99<br />
10- <div align = " center " >
10+ <div style = " text-align : center ; " >
1111
1212![ npm] ( https://img.shields.io/npm/v/react-sketch-canvas?style=flat-square )   ;  ; ![ NPM] ( https://img.shields.io/npm/l/react-sketch-canvas?style=flat-square )   ;  ; ![ npm] ( https://img.shields.io/npm/dm/react-sketch-canvas?style=flat-square ) <br />
1313![ npm bundle size] ( https://img.shields.io/bundlephobia/min/react-sketch-canvas?style=flat-square )   ;  ; ![ npm bundle size] ( https://img.shields.io/bundlephobia/minzip/react-sketch-canvas?style=flat-square ) <br />
1414[ ![ codecov] ( https://codecov.io/gh/vinothpandian/react-sketch-canvas/branch/master/graph/badge.svg?token=NJcqGRgbSa )] ( https://codecov.io/gh/vinothpandian/react-sketch-canvas )
1515<br />
16- This project was generated using [ DTS ] ( https://github.com/weiran-zsd/dts-cli ) .
16+ This project was built using [ Turborepo ] ( https://turbo.build/ ) .
1717
1818</div >
1919
@@ -26,7 +26,7 @@ This project was generated using [DTS](https://github.com/weiran-zsd/dts-cli).
2626
2727### Requirements
2828
29- - ** <span style =" color :red " >** Requires React >= 16.4 ** </span >**
29+ - ** <span style =" color :red " >** Requires React >= 16.8 ** </span >**
3030
3131### Wanna test React Sketch Canvas before using it?
3232
@@ -51,12 +51,12 @@ yarn add react-sketch-canvas
5151Common usage example
5252
5353``` javascript
54- import * as React from ' react' ;
55- import { ReactSketchCanvas } from ' react-sketch-canvas' ;
54+ import * as React from " react" ;
55+ import { ReactSketchCanvas } from " react-sketch-canvas" ;
5656
5757const styles = {
58- border: ' 0.0625rem solid #9c9c9c' ,
59- borderRadius: ' 0.25rem' ,
58+ border: " 0.0625rem solid #9c9c9c" ,
59+ borderRadius: " 0.25rem" ,
6060};
6161
6262const Canvas = () => {
@@ -80,7 +80,7 @@ import { ReactSketchCanvas } from "react-sketch-canvas";
8080
8181const styles = {
8282 border: " 0.0625rem solid #9c9c9c" ,
83- borderRadius: " 0.25rem"
83+ borderRadius: " 0.25rem" ,
8484};
8585
8686const Canvas = class extends React .Component {
@@ -100,12 +100,12 @@ const Canvas = class extends React.Component {
100100 / >
101101 < button
102102 onClick= {() => {
103- this .canvas .current .
103+ this .canvas .current
104104 .exportImage (" png" )
105- .then (data => {
105+ .then (( data ) => {
106106 console .log (data);
107107 })
108- .catch (e => {
108+ .catch (( e ) => {
109109 console .log (e);
110110 });
111111 }}
@@ -169,7 +169,7 @@ _Use ref to access the element and call the following functions to export image_
169169## Types
170170
171171``` ts
172- type ExportImageType = ' jpeg' | ' png' ;
172+ type ExportImageType = " jpeg" | " png" ;
173173
174174interface Point {
175175 x: number ;
0 commit comments