Skip to content

Commit 39d26d3

Browse files
committed
Flyout: use theme default for position
Initial POC to prove if this idea is possible and how we feel about it. * Related #51 * Closes #434
1 parent f885e96 commit 39d26d3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/flyout.js

+8
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ export class FlyoutElement extends LitElement {
4545
return;
4646
}
4747
this.config = config;
48+
49+
// The "position" is a value that can be defined from the dashboard.
50+
// There are two main options: "Default" or a specific value.
51+
// When "Default" is used, the value will be grabbed from the HTML element (e.g. explicitly set by the theme author).
52+
// In case it's not defined, the value defined in the `constructor` will be used ("bottom-right")
53+
this.position =
54+
objectPath.get(this.config, "addons.flyout.position", null) ||
55+
this.position;
4856
}
4957

5058
_close() {

0 commit comments

Comments
 (0)