email-input
Email input component for virtual-dom
Install
$ npm install --save email-input
Usage
var EmailInput = var emailInput = { var vtree = EmailInput //=> use virtual-dom to patch vtree into real DOM}
API
EmailInput(data)
-> function
Create a new email input observable.
data
Type: object
The initial state of the input.
value
Type: string
The email address.
EmailInput.validate(state)
-> boolean
Validate the email input state.
EmailInput.render(state, options)
-> object
Render an email state to a vtree object. options
will be merged with the defaults ({type: 'email', name: 'email'}
) and passed to virtual-hyperscript.
License
MIT © Ben Drucker