apeman-react-select

apeman react package for select component.

Usage no npm install needed!

<script type="module">
  import apemanReactSelect from 'https://cdn.skypack.dev/apeman-react-select';
</script>

README

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