@as-watson-test/watson_product_carousel
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

as-watson-product-carousel

How to install this package

This package is NPM Private Package Registry On Gitlab, so you need add token to your project first, just flow the step.

  • Open your terminal and enter echo @evan117:registry=https://gitlab.com/api/v4/packages/npm/ >> .npmrc.
echo @evan117:registry=https://gitlab.com/api/v4/packages/npm/ >> .npmrc
  • Open your project to find the .npmrc and open it.
  • Add //gitlab.com/api/v4/packages/npm/:\_authToken=srgNyDi6kHsJfhrEbeJk to second line and save the file.
//gitlab.com/api/v4/packages/npm/:\_authToken=srgNyDi6kHsJfhrEbeJk
  • Enter npm i @evan117/watson_product_carousel at your terminal
npm i @evan117/watson_product_carousel

.npmrc will be:

@evan117:registry=https://gitlab.com/api/v4/packages/npm/
//gitlab.com/api/v4/packages/npm/:_authToken=srgNyDi6kHsJfhrEbeJk

How to use

If you want to add this component into your project, flow the step

Step 1 import the package

import ProductCarousel from '@evan117/watson_product_carousel';

Step 2 Set your productList type to match the following type

type ProductType = {
  code: string;
  name: string;
  promotionFirstTag: string;
  imagesUrl: string;
  oldPrice: string;
  markDownPrice: string;
  averageRating: number;
  productNumberOfReview: number;
  stockLevelStatus: string;
};

type ProductListType = Array<ProductType>;

Step 3 Use the component way in code,and add the parameter 'products'

<ProductCarousel products={yourProductList} />

Readme

Keywords

none

Package Sidebar

Install

npm i @as-watson-test/watson_product_carousel

Weekly Downloads

0

Version

1.0.1

License

none

Unpacked Size

27.6 kB

Total Files

20

Last publish

Collaborators

  • elabfrontendteam