mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Add @bodyClass
argument to <DModal>
component (#22410)
This commit is contained in:
parent
ee1dbd46c6
commit
999014e8e5
@ -76,7 +76,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="modal-body" tabindex="-1">
|
<div class={{concat-class "modal-body" @bodyClass}} tabindex="-1">
|
||||||
{{#if (has-block "body")}}
|
{{#if (has-block "body")}}
|
||||||
{{yield to="body"}}
|
{{yield to="body"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
@ -72,4 +72,13 @@ module("Integration | Component | d-modal", function (hooks) {
|
|||||||
|
|
||||||
closeModalCalled = false;
|
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…
Reference in New Issue
Block a user