1.1.7 • Published 1 year ago
my-simple-canvas v1.1.7
my-simple-canvas
Usage
You’ll need to install React to use SimpleToolbar
.
If you only use SimpleCanvas
, React is not necessary.
Contents
Install
with yarn
$ yarn add my-simple-canvas
with npm
$ npm install my-simple-canvas
Examples
import React from "react";
import { SimpleToolbar, SimpleCanvas } from "my-simple-canvas";
export default function App() {
return (
<>
<SimpleToolbar />
<SimpleCanvas />
</>
);
}
Props
SimpleCanvas
Name | Type | Default | Description |
---|---|---|---|
width | number | 500 | HTML <canvas> Width Attribute |
height | number | 600 | HTML <canvas> Height Attribute |
SimpleToolbar
Name | Type | Default | Description |
---|---|---|---|
useThickness | boolean | true | Whether to Use Thickness Option in the Toolbar |
minTickness | number | 1 | Minimum Thickness That Can Be Set |
maxTickness | number | 5 | Maximum Thickness That Can Be Set |
useColor | boolean | true | Whether to Use Color Palette in the Toolbar |
colors | string or string[] | ["#f03434", "#f9690e", "#ffff7e", "#29f1c3", "#22a7f0", "#9f5afd", "#8c14fc"] | Colors of Palette |