How to show delete icon in lightning web component(LWC) - Salesforce Globe For You
Solution: use <lightning-button-icon icon-name="utility:delete" alternative-text="Delete" class="test slds-m-left_xx-small" title="Delete"></lightning-button-icon>
deleteIconLWC.html
<template>
<lightning-card title="Delete Icon in LWC">
<lightning-button-icon icon-name="utility:delete" alternative-text="Delete" class="test slds-m-left_xx-small" title="Delete"></lightning-button-icon>
</lightning-card>
</template>
deleteIconLWC.js
import { LightningElement } from 'lwc';
export default class DeleteIconLWC extends LightningElement {
}
deleteIconLWC.js-meta.xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>51.0</apiVersion>
<isExposed>true</isExposed>
<targets>
<target>lightning__RecordPage</target>
<target>lightning__AppPage</target>
<target>lightning__HomePage</target>
</targets>
</LightningComponentBundle>
Output:
No comments:
Post a Comment