a simple select
in your project directory open your cmd and type this :
npm install --save select-seb59000
in your react project to import the component, put those lines of code :
import React, { Component } from 'react'
import { Dropdown } from 'select-seb59000'
class Example extends Component {
const values = [0, 1, 2, 3, 4]
const onChange = ()=>{
//To Do();
}
render() {
return <Dropdown id="id" classOfSelect="classOfSelect" values={values} choices={values} onChange={onChange} />
}
}
id - the id of your DropDown
classOfSelect - the class for the selects
choices - the text displayed in the selection
values - the values which are saved
onChange - a function to run onChange()
MIT © Seb59000
recommended IDE : Visual Studio Code node version: >=10