Skip to content

Commit

Permalink
fix: add helper class to popover footer when it is hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
josias-r committed Nov 24, 2022
1 parent f94455c commit 5050857
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const CLASS_POPOVER_TIP = "boarding-popover-tip";
const CLASS_POPOVER_TITLE = "boarding-popover-title";
const CLASS_POPOVER_DESCRIPTION = "boarding-popover-description";
const CLASS_POPOVER_FOOTER = "boarding-popover-footer";
export const CLASS_POPOVER_FOOTER_HIDDEN = "boarding-popover-footer-hidden";
const CLASS_CLOSE_BTN = "boarding-close-btn";
const CLASS_NEXT_STEP_BTN = "boarding-next-btn";
const CLASS_PREV_STEP_BTN = "boarding-prev-btn";
Expand Down
2 changes: 2 additions & 0 deletions src/lib/core/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { BoardingSharedOptions } from "../boarding-types";
import {
CLASS_BTN_DISABLED,
CLASS_CLOSE_ONLY_BTN,
CLASS_POPOVER_FOOTER_HIDDEN,
ID_POPOVER,
POPOVER_ELEMENT,
POPOVER_OFFSET,
Expand Down Expand Up @@ -325,6 +326,7 @@ export default class Popover {

// If there was only one item, hide the buttons
if (!this.options.showButtons) {
this.popover.popoverFooter.classList.add(CLASS_POPOVER_FOOTER_HIDDEN);
this.popover.popoverFooter.style.display = "none";
return;
}
Expand Down

0 comments on commit 5050857

Please sign in to comment.