Sha256: 94c537e6962a9dea9cbb3d334106e14c6675e77ae132ed55bff4be793c1574e2
Contents?: true
Size: 1.64 KB
Versions: 119
Compression:
Stored size: 1.64 KB
Contents
import React from 'react' import { Caption, TextInput, Title, } from '../../' class TextInputDark extends React.Component { state = { firstName: '', } render() { const handleOnChange = ({ target }) => this.setState({ firstName: target.value }) const { firstName, } = this.state return ( <div> <TextInput dark label="First Name" placeholder="Enter first name" value="Timothy Wenhold" /> <TextInput dark label="Last Name" placeholder="Enter last name" /> <TextInput dark label="Phone Number" placeholder="Enter phone number" type="phone" /> <TextInput dark label="Email Address" placeholder="Enter email address" type="email" /> <TextInput dark label="Zip Code" placeholder="Enter zip code" type="number" /> <br /> <br /> <Title dark>{'Event Handler Props'}</Title> <br /> <Caption>{'onChange'}</Caption> <br /> <TextInput dark label="First Name" onChange={handleOnChange} placeholder="Enter first name" value={firstName} /> <If condition={firstName !== ''}> {`First name is: ${firstName}`} </If> </div> ) } } export default TextInputDark
Version data entries
119 entries across 119 versions & 1 rubygems