energy-redirect-modal
v1.2.0
Published
Redirect modal for Srovnejto energy sites made as web component https://www.webcomponents.org/introduction ## Basic usage 1. Install using npm from https://www.npmjs.com/package/energy-redirect-modal<br/> `npm install energy-redirect-modal --save`
Downloads
2
Readme
energy-redirect-modal
Redirect modal for Srovnejto energy sites made as web component https://www.webcomponents.org/introduction
Basic usage
Install using npm from https://www.npmjs.com/package/energy-redirect-modal
npm install energy-redirect-modal --save
Import script in html or serve from local hosting
<script type="module">import 'energy-redirect-modal'; </script>
Add the web component in html by using custom tag
<energy-redirect-modal version="cenyenergie" redirect-url="https://www.srovnejto.cz/energie?utm_source=tarifomat"></energy-redirect-modal>
version
parameter is optional, default value is"tarifomat"
, use"cenyenergie"
for different UX version.redirect-url
parameter is optional, default value is"https://www.srovnejto.cz/energie"
.Opening and closing the dialog Open the dialog by calling
energyRedirectOpen()
in code or close it by callingenergyRedirectClose()