Dogfalo / materialize

Materialize, a CSS Framework based on Material Design
https://materializecss.com
MIT License
38.87k stars 4.74k forks source link

Add userDismissible option for toasts #6666

Open EliasBinder opened 2 years ago

EliasBinder commented 2 years ago

Proposed changes

Introduced an additional option for toasts to allow them only to be dismissed programmatically and not by swiping. However, this option defaults to true, so there are no behaviour changes regarding the current version in case this option is omitted in M.toast({...}).

This can be useful for several cases:

Screenshots (if appropriate) or codepen:

Types of changes

Checklist: