Represents an action that can be performed in a snack.
Dismisses the snack. This function is called when the snack needs to be dismissed.
This function should be called when the user clicks on the action button in the snack.