Toaster
Import
Section titled “Import” import { Toaster } from 'c/boltage';export default class myLwc extends LightningElement { doSomething() { Toaster.success('Hello, world !'); } }Methods
Section titled “Methods”success(message, params) : void
Section titled “success(message, params) : void”error(message, params) : void
Section titled “error(message, params) : void”warning(message, params) : void
Section titled “warning(message, params) : void”info(message, params) : void
Section titled “info(message, params) : void”| Name | Type | Description |
|---|---|---|
message | string | Array of javascript objects received from any sources |
params | ToastParams | Description of how you want your options to look like by defining the props label, value and description |
Example
Section titled “Example”export default class myLwc extends LightningElement { @wire(apexMethod) apexResults; get comboboxOptions() { return this.apexResults?.data ? comboboxify(this.apexResults.data, { value: ['Relation__c.Field__c'], label: ['Relation__c.Field__c'] }) : []; } }