1.0.1 • Published 7 years ago
the-signature v1.0.1
the-signature
Signature pad of the-components
Installation
$ npm install the-signature --saveUsage
'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 ExampleComponentComponents
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.