atb-library
v1.0.1
Published
## Installation
Downloads
2
Readme
Atb-Library
Installation
npm i react-forge-filter-properties
Import
import { useFilterProperties, FilterPropertiesContext, FilterCategoryItem } from "react-forge-filter-properties";
Components
FilterCategoryItem
return <FilterCategoryItem
category={category}
classNames={{container: "container-class",
checkbox: "checkbox-class",
colorPicker: "checkbox-colorPicker"}}>
FilterPropertiesProvider
return <FilterPropertiesProvider viewer={viewer}>
<Container />
</FilterPropertiesProvider>
useFilterProperties
const Example = () => {
const { data, isLoading } = useFilterProperties(viewer, ["Area", "Volumen"]);
if (isLoading) return <h1>Data loading...</h1>
return (
<div>
{
data.map((category) => (
<FilterCategoryItem category={category} />
))
}
</div>
)
}
How to use
app.js