diff --git a/addon/components/uk-modal.js b/addon/components/uk-modal.js index c056ca5b..8193b21f 100644 --- a/addon/components/uk-modal.js +++ b/addon/components/uk-modal.js @@ -7,7 +7,18 @@ import { getOwner } from "@ember/application"; export default Component.extend({ layout, - closable: true, + escClose: true, + bgClose: true, + stack: false, + container: true, + clsPage: "uk-modal-page", + clsPanel: "uk-modal-dialog", + selClose: [ + ".uk-modal-close", + ".uk-modal-close-default", + ".uk-modal-close-outside", + ".uk-modal-close-full" + ].join(", "), init() { this._super(...arguments); @@ -31,9 +42,13 @@ export default Component.extend({ this.set( "modal", UIkit.modal(id, { - container: false, - bgClose: this.get("closable"), - escClose: this.get("closable") + escClose: this.get("escClose"), + bgClose: this.get("bgClose"), + stack: this.get("stack"), + container: this.get("container"), + clsPage: this.get("clsPage"), + clsPanel: this.get("clsPanel"), + selClose: this.get("selClose") }) ); diff --git a/tests/dummy/app/templates/components/modal.hbs b/tests/dummy/app/templates/components/modal.hbs index ba0b874b..13bb20e5 100644 --- a/tests/dummy/app/templates/components/modal.hbs +++ b/tests/dummy/app/templates/components/modal.hbs @@ -3,7 +3,6 @@
closable
escClose
Boolean
true
bgClose
Boolean
true
stack
Boolean
true
container
String
true
false
will prevent this behavior.clsPage
String
"uk-modal-page"
<body>
when modal is active.clsPanel
String
"uk-modal-dialog"
selClose
String
".uk-modal-close,
+ .uk-modal-close-default,
+ .uk-modal-close-outside,
+ .uk-modal-close-full"
+ + Note + Most of the settings are only read during initialization and can thus not be changed in the demo. +
{{/content.item}} {{#content.item}} {{code-snippet name="modal.hbs"}}