Skip to content

Commit

Permalink
Flyout: use theme default for position
Browse files Browse the repository at this point in the history
Initial POC to prove if this idea is possible and how we feel about it.

* Related #51
* Closes #434
  • Loading branch information
humitos committed Jan 8, 2025
1 parent f885e96 commit 39d26d3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/flyout.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ export class FlyoutElement extends LitElement {
return;
}
this.config = config;

// The "position" is a value that can be defined from the dashboard.
// There are two main options: "Default" or a specific value.
// When "Default" is used, the value will be grabbed from the HTML element (e.g. explicitly set by the theme author).
// In case it's not defined, the value defined in the `constructor` will be used ("bottom-right")
this.position =
objectPath.get(this.config, "addons.flyout.position", null) ||
this.position;
}

_close() {
Expand Down

0 comments on commit 39d26d3

Please sign in to comment.