@35up/react-recommendations-slider
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

35up React Recommendations Slider

React wrapper for 35up recommendations slider component.

Usage:

  1. Install the package:
  npm i -S @35up/react-recommendations-slider
  1. Put in your page
import { 
  RecommendationsSlider as TfupRecosSlider,
  type BaseProduct,
} from '@35up/react-recommendations-slider';


function handleAddToCartClick(e: CustomEvent): void {
  const product = e.detail;
  // Add product to your shopping cart
}

function handleProductClick(e: CustomEvent): void {
  const product = e.detail;
  // For example, show a dialog with details
}

const baseProduct: BaseProduct = {
  title: 'Apple iPhone 12 Pro - Pacific blue',
};

// in render method

<TfupRecosSlider
  baseProduct={baseProduct}
  seller="your-seller-id"
  onRecommendationClick={handleProductClick}
  onAddToCart={handleAddToCartClick}
/>

Readme

Keywords

none

Package Sidebar

Install

npm i @35up/react-recommendations-slider

Weekly Downloads

4

Version

1.0.0

License

MIT

Unpacked Size

787 kB

Total Files

13

Last publish

Collaborators

  • enjoythelive1
  • drafter500
  • schrodervictor
  • 35up-npm