apeman-react-select

3.1.1 • Public • Published

apeman-react-select

Build Status npm Version JS Standard

apeman react package for select component.

Installation

$ npm install apeman-react-select --save

Demo

Live demo is hosted on GitHub Pages.

Usage

'use strict'
 
import React from 'react'
import {ApSelect, ApSelectStyle} from 'apeman-react-select'
 
const ExampleComponent = React.createClass({
 
  getInitialState () {
    const s = this
    return {
      value: 'banana'
    }
  },
 
  render () {
    const s = this
    let { state } = s
    return (
      <div>
        <ApSelect options={ {
                    banana: 'Yes, banana!',
                    orange: 'Of course orange!',
                    apple: 'Nothing but apple!'
                } }
                  value={ state.value }
                  onChange={ s._handleChange }
        />
      </div>
    )
  },
 
  _handleChange (e) {
    const s = this
    let { value } = e.target
    s.setState({
      value: value
    })
  }
})
 

License

This software is released under the MIT License.

Links

Package Sidebar

Install

npm i apeman-react-select

Weekly Downloads

5

Version

3.1.1

License

MIT

Last publish

Collaborators

  • okunishinishi