mdropdownselector
v3.0.5
Published
import { Multiselect } from './lib'; import { useState,useEffect } from 'react';
Downloads
9
Readme
How to configure
import { Multiselect } from './lib'; import { useState,useEffect } from 'react';
function App() {
const [selected,setSelected]=useState(null)
useEffect(()=>{ console.log(selected,'selcted ') },[selected])
return (
<div className="App">
<Multiselect getSelected={setSelected} value={["value1", "value2","value3"]} buttonColor:"#12c675" buttonTextColor:"white" placeholder:"select values"/>
</div>
); }
export default App;
props :
value: it is data values. you can provide as a props as well directly component calling.
buttonColor: used to configure the background color of button in the modal (default is blue)
buttonTextColor: used to configure button text color in the modal (default is white)
placeholder: used to configure placeholder of Input