signature-component
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Install

npm i signature-component
yarn add signature-component

Using

import { useActions, Signature } from 'signature-component';

const { clearSignature, getImageSignature, isEmpty, changeBackgroundColor } = useActions()

const imageIsEmpty = () => {
  !isEmpty() ? console.log(getImageSignature()) : console.log("not image!")
}

return (
  <div>
    <div>
      <button onClick={() => clearSignature()}>
        Clear
      </button>
      <button onClick={imageIsEmpty}>
        Get image
      </button>
      <button onClick={() => changeBackgroundColor("#87CEEB")}>
        Background
      </button>
    </div>
    <Signature
      penColor="#000000"
      width={500}
      height={500}
    />
  </div>
)

Contact

Package Sidebar

Install

npm i signature-component

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

60.8 kB

Total Files

14

Last publish

Collaborators

  • caiohalves