0.0.4 • Published 2 years ago

widget-xxilk v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Built With Stencil

widget-xxilk

this is a homework project that implements reusable pay-later widget

Getting Started

npm install
npm start

To build the component for production, run:

npm run build

To run the unit tests for the components, run:

npm test

Before going live on prod

This component is not prod-ready as requires some additional work done:

  • Add required support for translations
  • Improve test coverage

Using this component

Script tag

  • Put a script tag similar to this <script type='module' src='https://unpkg.com/browse/xxilk-widget@0.0.2/dist/xxilk-widget/xxilk-widget.esm.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc <widget-xxilk amount="5000" language="en" hash="55b7d52b-020e-4143-bc69-3292b5002cf2"></widget-xxilk>

Node Modules

  • Run npm install xxilk-widget --save
  • Put a script tag similar to this <script type='module' src='node_modules/widget-xxilk/dist/xxilk-widget/xxilk-widget.esm.js'></script> in the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

In a stencil-starter app

  • Run npm install xxilk-widget --save
  • Add an import to the npm packages import xxilk-widget;
  • Then you can use the element anywhere in your template, JSX, html etc