A simple select options component to use in all your forms
Simply install the component with : npm i cg-p14-npm-select-component
Once installed, import the component in your project by doing import { Dropdown } from "cg-p14-npm-select-component";
and then call it with
There are a few props you can pass to the component to make it fit perfectly your needs :
- label : the label for the dropdown
- options : your data
- handler : a function to control what is send from the component
Please make sure to open the file Dropdown.js in the dist folder of the library that you can find in your node_modules folder. It contains a complete documentation about what is intended as props.
The component comes with a very basic style, but you can customize it easily by adding style to the .dropdown-label
and .dropdown
classes in your CSS or SCSS files and overwrite the default style.