Skip to content

Commit

Permalink
Merge pull request #2035 from umbraco/v14/bugfix/block-type-descriptions
Browse files Browse the repository at this point in the history
Bugfix: Block types do not show their descriptions
  • Loading branch information
iOvergaard authored Jun 24, 2024
2 parents 81d3527 + 295e5df commit b16a459
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export class UmbBlockTypeCardElement extends UmbLitElement {
@state()
_name?: string;

@state()
_description?: string;

@state()
_fallbackIcon?: string | null;

Expand All @@ -57,6 +60,7 @@ export class UmbBlockTypeCardElement extends UmbLitElement {
if (item) {
this._fallbackIcon = item.icon;
this._name = item.name;
this._description = item.description ?? undefined;
}
});
}
Expand All @@ -67,6 +71,7 @@ export class UmbBlockTypeCardElement extends UmbLitElement {
<uui-card-block-type
href=${ifDefined(this.href)}
.name=${this._name ?? 'Unknown'}
.description=${this._description}
.background=${this.backgroundColor}>
${this.iconFile
? html`<img src=${this.iconFile} alt="" />`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ const mapper = (item: DocumentTypeItemResponseModel): UmbDocumentTypeItemModel =
icon: item.icon,
unique: item.id,
name: item.name,
description: item.description,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export type UmbDocumentTypeItemModel = {
name: string;
isElement: boolean;
icon?: string | null;
description?: string | null;
};

0 comments on commit b16a459

Please sign in to comment.