Skip to content

Customized Signature Pad #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Customized Signature Pad #1

wants to merge 2 commits into from

Conversation

SteveGBanton
Copy link
Collaborator

@SteveGBanton SteveGBanton commented Jun 19, 2018

Description:

Customizes react-signature-pad, outputs only a canvas that can be customized via props. Can pull out handle functions clear() and download() to clear the pad and download the pad's contents to a PNG.

Notes:

  • PR request on hourglass with import/usage example.
  • Added parcel and babel for building distribution.

Usage Example

import SignaturePad from 'react-signature-pad';

let clear = () => {}
let download = () => {}

return (
...
<SignaturePad
          width={width - 50}
          height={height - 100}
          clearFunction={(c) => { clear = c; }}
          downloadFunction={(dl) => { download = dl; }}
        />
...
<button onClick={() => clear()}>Clear</button>
...
)

Full list of props at flow types SignatureProps inside src/index.js.

Please let me know if you have other suggestions for props that should be passed in or other control functions we might want.

@SteveGBanton SteveGBanton changed the title Customized Signature Pad WIP: Customized Signature Pad Jun 19, 2018
@SteveGBanton SteveGBanton changed the title WIP: Customized Signature Pad Customized Signature Pad Jun 22, 2018
@0xSalman 0xSalman requested review from snaumov, jhlcm and 0xSalman July 3, 2018 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants