1.0.1 • Published 5 years ago

the-signature v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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

NameTypeDescriptionDefault
colorstring'#555'
heightunion'150px'
widthunion'100%'
onBegin() => null
onEnd() => null
onPad() => null

TheSignatureInput

Props

NameTypeDescriptionDefault
namestring
onUpdatefunc
valuestringnull

TheSignatureStyle

Style for TheSignature

Props

NameTypeDescriptionDefault
optionsobjectStyle options{}

License

This software is released under the MIT License.

Links