Stencil Popup is a standalone component for facilitate the opening of pop-up windows and obtain redirection data.
- Run
npm install stencil-popup --save
- Add an import to the npm packages
import stencil-popup;
- Then you can use the element anywhere in your template, JSX, html etc
- Put a script tag similar to this
<script src='https://unpkg.com/stencil-popup@latest/dist/stencil-popup.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
- Run
npm install stencil-popup --save
- Put a script tag similar to this
<script src='node_modules/stencil-popup/dist/stencil-popup.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
Property | Attribute | Description | Type |
---|---|---|---|
config |
-- | Configuration of the pop-up window and other things. | object={ ... } |
{
button_text: "Abrir Popup",
type: "_blank",
popupOptions: {
width: 600,
height: 679,
top: window.screenY + ((window.outerHeight - 600) / 2.5),
left: window.screenX + ((window.outerWidth - 679) / 2)
}
}
Event | Detail | Description |
---|---|---|
closedPopup |
Event activated when the pop-up window was closed | |
redirectPopup |
Event activated when the popup window has redirected obtaining parameters. |
Name | Type | Optional |
---|---|---|
url |
string |
no |
redirectUri |
string |
yes |