1.0.4 • Published 5 years ago

stencil-popup v1.0.4

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

Built With Stencil

Stencil Popup

Stencil Popup is a standalone component for facilitate the opening of pop-up windows and obtain redirection data.

Using this component

In a Stencil-starters or Ionic-pwa-toolkit

  • 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

Script tag

  • 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

Node Modules

  • 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

Properties

PropertyAttributeDescriptionType
config--Configuration of the pop-up window and other things.object={ ... }

Properties (example):

{
    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)
    }
}

Events

EventDetailDescription
closedPopupEvent activated when the pop-up window was closed
redirectPopupEvent activated when the popup window has redirected obtaining parameters.

Methods

open(url: string, redirectUri: string)

Parameters

NameTypeOptional
urlstringno
redirectUristringyes
1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago