@torchlight-technology/email-field
v0.0.4
Published
Email field component
Downloads
3
Readme
Email field for gatsby boilerplate.
Getting Started
import Email from '@torchlight-technology/email-field'
import { setField } from '../../state/action'
const ExamplePage = props => (
<Email {...props} />
)
const mapDispatchToProps = dispatch => {
return {
setField: field => dispatch( setField( field ) )
}
}
export default connect( null, mapDispatchToProps )( ExamplePage )
Installing
npm i @torchlight-technology/email-field
List of all props
name - sets name for field default is email
<Email name="new-email-name" {...props} />
hideLabel - hides label in field
<Email name="new-email-name" {...props} />
labelText - set label text default is Email
<Email labelText="Enter example email" {...props} />
className - sets class for field default is field
<Email className="new-class" {...props} />
errorClass - sets class for error on field default is has-error
<Email errorClass="error" {...props} />
placeholder - sets placeholder for field default is [email protected]
Just placeholder no value hides placeholder
<Email placeholder {...props} />
Set text for placeholder
<Email placeholder="New email placeholder" {...props} />
noErrorMessage
removes error message
<Email noErrorMessage {...props} />
errorMessage - custom error message
<Email errorMessage="Not valid field example" {...props} />