Skip to content

Commit a505969

Browse files
docs(toast): refactor documentation for dismiss method
1 parent ad35701 commit a505969

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

core/src/components/toast/toast.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -397,16 +397,15 @@ export class Toast implements ComponentInterface, OverlayInterface {
397397

398398
/**
399399
* Dismiss the toast overlay after it has been presented.
400+
* This is a no-op if the overlay has not been presented yet. If you want
401+
* to remove an overlay from the DOM that was never presented, use the
402+
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
400403
*
401404
* @param data Any data to emit in the dismiss events.
402405
* @param role The role of the element that is dismissing the toast.
403406
* This can be useful in a button handler for determining which button was
404407
* clicked to dismiss the toast.
405-
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
406-
*
407-
* This is a no-op if the overlay has not been presented yet. If you want
408-
* to remove an overlay from the DOM that was never presented, use the
409-
* [remove](https://developer.mozilla.org/en-US/docs/Web/API/Element/remove) method.
408+
* Some examples include: `"cancel"`, `"destructive"`, `"selected"`, and `"backdrop"`.
410409
*/
411410
@Method()
412411
async dismiss(data?: any, role?: string): Promise<boolean> {

0 commit comments

Comments
 (0)