mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 12:13:37 +08:00
DEV: allows <UserStatusMessage /> to accept custom css class (#20954)
This will now allow: ``` <UserStatusMessage @status={{@message.user.status}} @class="foo" /> ```
This commit is contained in:
parent
e792f779d0
commit
8de45602ff
|
@ -1,4 +1,4 @@
|
|||
<span class="user-status-message">
|
||||
<span class={{concat-class "user-status-message" @class}}>
|
||||
{{emoji @status.emoji skipTitle=true}}
|
||||
{{#if @showDescription}}
|
||||
<span class="user-status-message-description">
|
||||
|
|
|
@ -154,4 +154,14 @@ module("Integration | Component | user-status-message", function (hooks) {
|
|||
|
||||
assert.dom(".user-status-message").exists();
|
||||
});
|
||||
|
||||
test("accepts a custom css class", async function (assert) {
|
||||
this.set("status", { emoji: "tooth", description: "off to dentist" });
|
||||
|
||||
await render(
|
||||
hbs`<UserStatusMessage @status={{this.status}} @class="foo" />`
|
||||
);
|
||||
|
||||
assert.dom(".user-status-message.foo").exists();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user