tippy: Initialize tippy in portico.

As a prep-commit for updating the billing / corporate pages for
demo organizations, initialize tippy.js with a default setting
for portico pages to use in general.
This commit is contained in:
Lauryn Menard 2022-08-05 21:55:46 +02:00 committed by Tim Abbott
parent d350406991
commit 8a20884230
3 changed files with 20 additions and 0 deletions

View File

@ -2,3 +2,4 @@ import "./common";
import "../portico/header";
import "../portico/google-analytics";
import "../../styles/portico/portico_styles.css";
import "tippy.js/dist/tippy.css";

View File

@ -0,0 +1,18 @@
import $ from "jquery";
import tippy from "tippy.js";
function initialize() {
tippy("[data-tippy-content]", {
// Same defaults as set in web app tippyjs module.
maxWidth: 300,
delay: [100, 20],
touch: ["hold", 750],
// Different default from web app tippyjs module.
animation: true,
placement: "bottom",
});
}
$(() => {
initialize();
});

View File

@ -17,6 +17,7 @@
],
"upgrade": [
"./static/js/bundles/portico",
"./static/js/portico/tippyjs",
"./static/js/portico/landing-page",
"./static/styles/portico/landing_page.css",
"./static/js/billing/helpers",