A select menu with react and tailwind
npm install @rockethell/selectmenu``bash`
npm i @rockethell/selectmenu
- label: label text displayed above the select menu
- data : array of objects to be displayed in the select menu
- labelKey : key to be displayed as label in the select menu
- valueKey : key to be used as value in the select menu
- value : value of the selected option
- rest : additional props to be passed to the select menu
`jsx
import SelectMenu from '@rockethell/selectmenu';
function App() {
const departments = [
{
department: 'Sales',
},
{
department: 'Marketing',
},
];
const states = [
{
name: 'Alabama',
abbreviation: 'AL',
},
{
name: 'Alaska',
abbreviation: 'AK',
},
];
return (
data={states}
valueKey='abbreviation'
labelKey='name'
/>
export default App;
``