3.0.0 • Published 10 years ago
email-input v3.0.0
email-input 
Email input component for virtual-dom
Install
$ npm install --save email-inputUsage
var EmailInput = require('email-input')
var emailInput = EmailInput()
function render (state) {
var vtree = EmailInput.render(state)
//=> use virtual-dom to patch vtree into real DOM
}
emailInput(render)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