JSPM

@tabtree/react-family-products

1.0.9
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 4
    • Score
      100M100P100Q50132F
    • License MIT

    A React drawer component that displays product families

    Package Exports

    • @tabtree/react-family-products
    • @tabtree/react-family-products/dist/index.js
    • @tabtree/react-family-products/dist/index.modern.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tabtree/react-family-products) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    Family Products Drawer

    A React component that displays product families in a sliding drawer.

    Installation

    npm install @tabtree/react-family-products

    or

    yarn add @tabtree/react-family-products

    Usage

    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