This package has been deprecated

    Author message:

    This package has been deprecated. Please find this package under its new name @cloudflare/component-input.

    cf-component-input

    7.0.0 • Public • Published

    cf-component-input

    Cloudflare Input Component

    Installation

    Installation with yarn is recommended

     
    $ yarn add cf-component-input
     

    Usage

    import React from 'react';
    import { Input, LabeledInput } from 'cf-component-input';
     
    class InputComponent extends React.Component {
      constructor(props) {
        super(props);
        this.state = {
          inputValue: 'Hello World'
        };
        this.handleChange = this.handleChange.bind(this);
      }
     
      handleChange(e) {
        const value = e.target.value;
        this.setState({
          inputValue: value
        });
      }
     
      render() {
        return (
          <div>
            <Input
              name="example"
              value={this.state.inputValue}
              onChange={this.handleChange}
            />
     
            <Input
              type="search"
              name="example"
              value={this.state.inputValue}
              onChange={this.handleChange}
            />
     
            <Input
              disabled
              name="example"
              value={this.state.inputValue}
              onChange={this.handleChange}
            />
     
            <LabeledInput
              label="@"
              name="example"
              value={this.state.inputValue}
              onChange={this.handleChange}
            />
          </div>
        );
      }
    }
     
    export default InputComponent;
     

    Keywords

    none

    Install

    npm i cf-component-input

    DownloadsWeekly Downloads

    11

    Version

    7.0.0

    License

    BSD-3-Clause

    Unpacked Size

    33 kB

    Total Files

    14

    Last publish

    Collaborators

    • jgentes
    • threepointone
    • rexscaria
    • dcruz_cf
    • xuranwang
    • jculvey
    • sejoker
    • caass
    • vasturiano
    • cf-ci-write
    • segments-write
    • thibmeu
    • nataliescottdavidson
    • xortive
    • gurjinder
    • cf-ci2
    • lvalenta
    • nilslice
    • worenga