Skip to content

Commit 122721e

Browse files
committed
Cards markup tidy-up
1 parent 37a085b commit 122721e

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

packages/uui-card-block-type/lib/uui-card-block-type.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export class UUICardBlockTypeElement extends UUICardElement {
9595
return html`
9696
<div id="content">
9797
<span title="${this.name}" id="name">${this.name}</span>
98-
<small title="${this.description}">${this.description}<slot name="description"></slot></small>
98+
<small title="${ifDefined(this.description)}">${this.description}<slot name="description"></slot></small>
9999
</div></div>
100100
`;
101101
}

packages/uui-card-user/lib/uui-card-user.element.ts

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,22 @@ export class UUICardUserElement extends UUICardElement {
6868
}
6969

7070
#renderContent() {
71-
return html`<div id="content">
72-
${this._avatarSlotHasContent
73-
? nothing
74-
: html`<uui-avatar
75-
class="avatar"
76-
name=${this.name}
77-
size="m"></uui-avatar>`}
78-
<slot
79-
name="avatar"
80-
class="avatar"
81-
@slotchange=${this._avatarSlotChanged}></slot>
82-
<span title="${this.name}">${this.name}</span>
83-
<slot></slot>
84-
</div>`;
71+
return html`
72+
<div id="content">
73+
${this._avatarSlotHasContent
74+
? nothing
75+
: html`<uui-avatar
76+
class="avatar"
77+
name=${this.name}
78+
size="m"></uui-avatar>`}
79+
<slot
80+
name="avatar"
81+
class="avatar"
82+
@slotchange=${this._avatarSlotChanged}></slot>
83+
<span title="${this.name}">${this.name}</span>
84+
<slot></slot>
85+
</div>
86+
`;
8587
}
8688

8789
public render() {

0 commit comments

Comments
 (0)