0.0.13 • Published 5 years ago
loy-components v0.0.13
Loyalty Web Components
Using this component
Script tag
- Put a script tag similar to this
<script src='https://unpkg.com/loy-components@0.0.13/dist/loyfront.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
Node Modules
- Run
npm install loy-components --save
- Put a script tag similar to this
<script src='node_modules/loy-components/dist/loyfront.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
In any framework or library app
- Run
npm install loy-components --save
- Add an import to the npm packages
import loy-components;
- Then you can use the element anywhere in your template, JSX, html etc
Usage
- Right now it supports three layouts and they are grid, list & carousel
- Custom tag supports two attributes and they are layout, simplecontenturl
Html Tag : <loy-simple-content></loy-simple-content>
Supported Atrributes: layout & simplecontenturl
layout - based on configured layout it renders in the html
simplecontenturl - Use any Loyalty portal simple content API URL
EXAMPLE :
<loy-simple-content
layout="carousel"
simplecontenturl="https://b2e.skidataus.com/DesktopModules/v2/API/SimpleContent">
</loy-simple-content>
<loy-simple-content
layout="grid"
simplecontenturl="https://b2e.skidataus.com/DesktopModules/v2/API/SimpleContent">
</loy-simple-content>
<loy-simple-content
layout="list"
simplecontenturl="https://b2e.skidataus.com/DesktopModules/v2/API/SimpleContent">
</loy-simple-content>