the-signaturedeprecated

Signature pad of the-components

Usage no npm install needed!

<script type="module">
  import theSignature from 'https://cdn.skypack.dev/the-signature';
</script>

README

the-signature

Build Status npm Version JS Standard

Signature pad of the-components

Installation

$ npm install the-signature --save

Usage

'use strict'

import React from 'react'
import { TheSignatureInput, TheSignatureStyle } from 'the-signature'

class ExampleComponent extends React.Component {
  constructor (props) {
    super(props)
    this.state = {
      s1: null,
    }
  }

  render () {
    return (
      <div>
        <TheSignatureStyle/>
        <TheSignatureInput onUpdate={(v) => this.setState(v)}
                           name={'s1'}
                           value={this.state.s1}
        >
        </TheSignatureInput>
      </div>

    )
  }
}

export default ExampleComponent

Components

TheSignature

Signature pad of the-components

Props

Name Type Description Default
color string '#555'
height union '150px'
width union '100%'
onBegin () => null
onEnd () => null
onPad () => null

TheSignatureInput

Props

Name Type Description Default
name string ``
onUpdate func ``
value string null

TheSignatureStyle

Style for TheSignature

Props

Name Type Description Default
options object Style options {}

License

This software is released under the MIT License.

Links