Skip to content

Commit b16a459

Browse files
authored
Merge pull request #2035 from umbraco/v14/bugfix/block-type-descriptions
Bugfix: Block types do not show their descriptions
2 parents 81d3527 + 295e5df commit b16a459

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/packages/block/block-type/components/block-type-card/block-type-card.element.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ export class UmbBlockTypeCardElement extends UmbLitElement {
4646
@state()
4747
_name?: string;
4848

49+
@state()
50+
_description?: string;
51+
4952
@state()
5053
_fallbackIcon?: string | null;
5154

@@ -57,6 +60,7 @@ export class UmbBlockTypeCardElement extends UmbLitElement {
5760
if (item) {
5861
this._fallbackIcon = item.icon;
5962
this._name = item.name;
63+
this._description = item.description ?? undefined;
6064
}
6165
});
6266
}
@@ -67,6 +71,7 @@ export class UmbBlockTypeCardElement extends UmbLitElement {
6771
<uui-card-block-type
6872
href=${ifDefined(this.href)}
6973
.name=${this._name ?? 'Unknown'}
74+
.description=${this._description}
7075
.background=${this.backgroundColor}>
7176
${this.iconFile
7277
? html`<img src=${this.iconFile} alt="" />`

src/packages/documents/document-types/repository/item/document-type-item.server.data-source.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@ const mapper = (item: DocumentTypeItemResponseModel): UmbDocumentTypeItemModel =
3535
icon: item.icon,
3636
unique: item.id,
3737
name: item.name,
38+
description: item.description,
3839
};
3940
};

src/packages/documents/document-types/repository/item/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ export type UmbDocumentTypeItemModel = {
66
name: string;
77
isElement: boolean;
88
icon?: string | null;
9+
description?: string | null;
910
};

0 commit comments

Comments
 (0)