Skip to content

Commit

Permalink
feat(new api option pin): popover only closes by clicking the trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
jyounce committed Dec 28, 2018
1 parent af5d09f commit 62dcfd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/client/scripts/rb-popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
fitContent: props.boolean,
hover: props.boolean,
kind: props.string,
pin: props.boolean, // popover only closes by clicking trigger
unstyled: props.boolean,
iconKind: props.string,
iconSize: props.number,
Expand Down Expand Up @@ -186,6 +187,7 @@
this.showPopover = true;
}
_windowClickToggle(e) { // :void
if (this.pin) return;
if (!this.showPopover) return;
const path = e.composedPath();
if (path.includes(this.rb.elms.popover)) return;
Expand Down
1 change: 1 addition & 0 deletions src/client/styles/main/trigger.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* TRIGGER
**********/
rb-button {
transition: opacity .18s;
&:hover {
opacity: .6;
}
Expand Down

0 comments on commit 62dcfd0

Please sign in to comment.