DEV: allows to set a class on d-popover component (#16670)
This commit is contained in:
parent
7e026e8ddf
commit
c99a6b10fb
|
@ -10,6 +10,8 @@ export default class DiscoursePopover extends Component {
|
|||
|
||||
options = null;
|
||||
|
||||
class = null;
|
||||
|
||||
didInsertElement() {
|
||||
this._super(...arguments);
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
<div id={{componentId}} class="d-popover {{if isExpanded "is-expanded"}}">
|
||||
<div id={{componentId}} class="d-popover {{class}} {{if isExpanded "is-expanded"}}">
|
||||
{{yield (hash isExpanded=isExpanded)}}
|
||||
</div>
|
||||
|
|
|
@ -73,4 +73,12 @@ discourseModule("Integration | Component | d-popover", function (hooks) {
|
|||
assert.ok(exists(".d-icon-chevron-up"));
|
||||
},
|
||||
});
|
||||
|
||||
componentTest("d-popover component accepts a class property", {
|
||||
template: hbs`{{#d-popover class="foo"}}{{/d-popover}}`,
|
||||
|
||||
async test(assert) {
|
||||
assert.ok(exists(".d-popover.foo"));
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue