mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 08:15:00 +00:00
DEV: Add @bodyClass
argument to <DModal>
component (#22410)
This commit is contained in:
parent
ee1dbd46c6
commit
999014e8e5
@ -76,7 +76,7 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="modal-body" tabindex="-1">
|
||||
<div class={{concat-class "modal-body" @bodyClass}} tabindex="-1">
|
||||
{{#if (has-block "body")}}
|
||||
{{yield to="body"}}
|
||||
{{else}}
|
||||
|
@ -72,4 +72,13 @@ module("Integration | Component | d-modal", function (hooks) {
|
||||
|
||||
closeModalCalled = false;
|
||||
});
|
||||
|
||||
test("header and body classes", async function (assert) {
|
||||
await render(
|
||||
hbs`<DModal @inline={{true}} @bodyClass="my-body-class" @headerClass="my-header-class" @title="Hello world" />`
|
||||
);
|
||||
|
||||
assert.dom(".d-modal .modal-header").hasClass("my-header-class");
|
||||
assert.dom(".d-modal .modal-body").hasClass("my-body-class");
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user