label-float-select

1.0.1 • Public • Published

label-float-select

install

npm -i --save label-float-select

Code

import React from 'react';
import LabelFloatSelect from 'label-float-select';

export default class Container extends React.Component{
    constructor(props){
        super(props);
        this.state={
            options:[{value:'Chennai',label:'Chennai'},{value:'Bangalore',label:'Bangalore'}],
            selected:'Chennai'
        };
        this.handler=this.handler.bind(this)
    }
    handler(val){
        this.setState({
            selected:val,
        })
    }
    render(){
        return(
            <div className="">
                <LabelFloatSelect  
                    ref=""
                    options={this.state.options}
                    label="Select the City"
                    fontSize="18px"
                    fontFamily="monospace"
                    onChange={this.handler}
                    color="blue"
                    value={this.state.selected}
                />
            </div>
        )
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i label-float-select

Weekly Downloads

4

Version

1.0.1

License

ISC

Unpacked Size

20.2 kB

Total Files

9

Last publish

Collaborators

  • queerpassenger