kodobe-react-filter
v1.0.1
Published
kodobe react filter
Downloads
2
Readme
Kodobe React Filter
This is a simple react filter package, check it out at github repo
Install
npm install kodobe-react-filter
or
yarn add kodobe-react-filter
Setup
import Filter from 'kodobe-react-filter';
Usage
import Filter from "kodobe-react-filter";
function App() {
return (
<div>
<Filter
clearbuttonprops={{ style: { color: "blue" } }}
handleChange={(e) => console.log(e)}
params={[
{
label: "Name",
name: "name",
type: "search",
otherProps: {
// iconRight: "A",
// placeholder: "OOps",
},
},
{
label: "Gender",
name: "gender",
type: "select",
options: [
{
title: "Male",
value: "male",
},
{
title: "Female",
value: "female",
},
{
title: "Others",
value: "others",
},
],
},
{
label: "Subscription",
name: "subscription",
type: "select",
options: [
{
title: "Freemium",
value: "free",
},
{
title: "Regular",
value: "regular",
},
{
title: "Premium",
value: "premium",
},
],
},
]}
/>
</div>
);
}
Options
- params: array,
- handleChange: function