-
-
Save arun12209/8c768121783c8be8819ae04f06cf8c46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { LightningElement } from 'lwc'; | |
import LightningConfirm from 'lightning/confirm'; | |
export default class ConfirmComponent extends LightningElement { | |
async handleConfirmClick() { | |
const result = await LightningConfirm.open({ | |
message: 'this is the prompt message', | |
variant: 'headerless', | |
label: 'this is the aria-label value', | |
// setting theme would have no effect | |
}); | |
//result is true if OK was clicked | |
//and false if cancel was clicked | |
console.log('Result: '+ result); | |
//Confirm has been closed | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment