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

Version Path
playbook_ui-6.6.1 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.0.pre.alpha10 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-6.6.0 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-6.5.2 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-6.5.1 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-6.5.0 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.1.pre.alpha8 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.1.pre.alpha7 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.1.pre.alpha6 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.1.pre.alpha5 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.1.pre.alpha4 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.1.pre.alpha3 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.1.pre.alpha2 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-6.4.2 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.1.pre.alpha1 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.0.pre.alpha9 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.0.pre.alpha8 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.0.pre.alpha7 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-6.4.1 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx
playbook_ui-7.0.0.pre.alpha6 app/pb_kits/playbook/pb_text_input/docs/_text_input_dark.jsx