@tabtree/react-family-products
v1.0.9
Published
A React drawer component that displays product families
Maintainers
Readme
Family Products Drawer
A React component that displays product families in a sliding drawer.
Installation
npm install @tabtree/react-family-productsor
yarn add @tabtree/react-family-productsUsage
import React, { useState } from "react";
import { FamilyProducts } from "@tabtree/react-family-products";
function App() {
const [drawerOpen, setDrawerOpen] = useState(false);
return (
<div>
<button onClick={() => setDrawerOpen(true)}>Open Product Drawer</button>
<FamilyProducts
onOpen={drawerOpen}
onDismiss={setDrawerOpen}
emailId={emailId}
/>
</div>
);
}
export default App;Props
| Prop | Type | Description | | --------- | -------- | --------------------------------------------- | | onOpen | boolean | Controls whether the drawer is open or closed | | onDismiss | function | Callback function to close the drawer | | emailId | string | based on email fav products will list |
Dependencies
This component requires the following peer dependencies:
- react
- react-dom
- framer-motion
- axios
License
MIT
