From 1f3c77dbbe4cd3abdb48cd25df10311ab4ab94b8 Mon Sep 17 00:00:00 2001 From: Melissa Thompson Date: Tue, 31 Oct 2023 17:40:14 -0400 Subject: [PATCH] docs(popover): add toggleSpectrumPopover to show open/close --- components/popover/metadata/popover.yml | 24 +++++++++++++----------- site/resources/js/enhancement.js | 6 ++++++ 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/components/popover/metadata/popover.yml b/components/popover/metadata/popover.yml index 02336163085..f615f7ec240 100644 --- a/components/popover/metadata/popover.yml +++ b/components/popover/metadata/popover.yml @@ -51,7 +51,7 @@ examples: -
+
@@ -76,7 +76,7 @@ examples:
-
+
@@ -87,7 +87,8 @@ examples:

Cross Offset of Tip = 50px

- diff --git a/site/resources/js/enhancement.js b/site/resources/js/enhancement.js index dd3344653a5..7824f9a5d29 100644 --- a/site/resources/js/enhancement.js +++ b/site/resources/js/enhancement.js @@ -880,6 +880,12 @@ function closeDialog(dialog) { }, 130); } +function toggleSpectrumPopover(popover) { + popover.classList.contains("is-open") + ? popover.classList.remove("is-open") + : popover.classList.add("is-open"); +} + function animateCircleLoaders() { var value = 0; setInterval(function () {