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;
 

Readme

Keywords

none

Package Sidebar

Install

npm i cf-component-input

Weekly Downloads

259

Version

7.0.0

License

BSD-3-Clause

Unpacked Size

33 kB

Total Files

14

Last publish

Collaborators

  • lerwincf
  • lbarthonet
  • cf-media-manager
  • jacobbednarz
  • celso
  • cf-radar
  • dash_service_account
  • g4brym
  • snigdha34
  • wrangler-publisher
  • marksteyn
  • chiminator
  • sgoodhew_cf
  • terinjokes
  • third774
  • jsteinberger
  • jasnell
  • asapzacy
  • pcostanzo
  • gregbrimble
  • geelen
  • rexscaria
  • dcruz_cf
  • xuranwang
  • jculvey
  • sejoker
  • vasturiano
  • cf-ci-write
  • segments-write
  • thibmeu
  • xortive
  • gurjinder
  • cf-ci2
  • lvalenta
  • worenga