PrestaShop Billing Plans
A Web component library to display your plans
Documentation
About The Project
PrestaShop Billing Plans is a web component library that aims to provide a set of reusable components to use to display your plans in your module.
Using the Web Components
Prerequisites
- A package manager like NPM, yarn or pnpm
Installation
For the moment this package is private
To install it you must configure a .npmrc file in your project
//registry.npmjs.org/:_authToken=YOUR_NPM_RO_SQUAD_TOKEN
@prestashopcorp:registry=https://registry.npmjs.org/
You can ask the IT for a NPM read only token for your squad if you don't have a NPM Token
$ npm install @prestashopcorp/billing-plans --save
$ yarn add @prestashopcorp/billing-plans
$ pnpm install @prestashopcorp/billing-plans
(back to top)
Usage
- Import the Web component in the JS file your are using for your module and define a new customElement
import { BillingPlanWeb } from '@prestashopcorp/billing-plans'
customElements.define("billing-plan", BillingPlanWeb)
- Then add the web component to your template
<billing-plan name="Basic" price="20$"/>
ℹ️ Web components can use the same props as Vue components
(back to top)