Choice JS
Installation
npm i choices.js
- For use of ChoiceJS we create own custom hook with the help of choices.js
- The navigation path of this file are ../src/components/choices.js
- For the use of ChoiceJS you want appear in your component please follow the below example code
Script
import ChoicesJs from "../../components/choices";
const options = [
{ value: "Past 30 Days", label: "Past 30 Days" },
{ value: "Past 60 Days", label: "Past 60 Days" },
{ value: "Past 90 Days", label: "Past 90 Days" },
{ value: "Past 1 year", label: "Past 1 year" },
{ value: "Past 2 year", label: "Past 2 year" },
];
const Index = () => {
return(
<div className="form-group mb-0 ">
<ChoicesJs options={options} className="js-choice" select="one" />
</div>
)
}