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:
Joffrey JAFFEUX 2023-04-04 10:04:40 +02:00 committed by GitHub
parent e792f779d0
commit 8de45602ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -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">

View File

@ -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();
});
});