1.0.3 • Published 5 years ago

react-things v1.0.3

Weekly downloads
19
License
-
Repository
github
Last release
5 years ago

React things

Some useful React Components

Install

npm install -S react-things

Use

import React from 'react';
import {RaisedButton, FlatButton, GhostButton, MaterialInput} from 'react-things';

export default class App extends React.Component {
  constructor(){
    super();
    this.input = React.createRef();
  }
  render(){
    return (
      <div className="App">
        <div>
          <RaisedButton title="Raised button" onClick={this.trigger.bind(this)}/>
          <RaisedButton title="Raised button disable" enable={false} />
        </div>
        <div>
          <RaisedButton title="Raised button" color="#e3a430" />
          <RaisedButton title="Raised button disable" enable={false} color="#e3a430" />
        </div>

        <div>
          <FlatButton title="Flat button" />
          <FlatButton title="Flat button disable" enable={false} />
        </div>
        <div>
          <FlatButton title="Flat button" color="#e3a430" />
          <FlatButton title="Flat button disable" enable={false} color="#e3a430" />
        </div>

        <div>
          <GhostButton title="Ghost button" />
          <GhostButton title="Ghost button disable" enable={false} />
        </div>
        <div>
          <GhostButton title="Ghost button" color="#e3a430" backgroundColor="#ffffff" />
          <GhostButton title="Ghost button disable" enable={false} color="#e3a430" backgroundColor="#ffffff" />
        </div>

        <MaterialInput title="Material input" ref={this.input} onChange={this.trigger.bind(this)}/>

      </div>
    );
  }

  trigger(){
    console.log(this.input.current.value);
  }
  
}