Skip to content

Commit

Permalink
Merge pull request #53 from asikora-sf/icon
Browse files Browse the repository at this point in the history
Allow override of icon location
  • Loading branch information
AdamLiechty authored Aug 2, 2023
2 parents aaa2778 + d58b711 commit 9bd579c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions force-app/main/default/lwc/recordHeader/recordHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ export default class RecordHeader extends LightningElement {
@api recordName;
@api objectApiName;

// Optional property to set the icon name. Otherwise uses standard icon
@api iconName;

get cardIconName() {
return `standard:${
this.objectApiName ? this.objectApiName.toLowerCase() : ""
return `${
this.iconName
? this.iconName
: `standard:${
this.objectApiName ? this.objectApiName.toLowerCase() : ""
}`
}`;
}
}

0 comments on commit 9bd579c

Please sign in to comment.