SnackbarSparkVisuals
class SnackbarSparkVisuals(val message: String, val icon: SparkIcon? = null, val intent: SnackbarIntent = SnackbarDefaults.intent, val style: SnackbarStyle = SnackbarDefaults.style, val actionLabel: String? = null, val withDismissAction: Boolean = false, val actionOnNewLine: Boolean = false, val duration: SnackbarDuration = SnackbarDuration.Short) : SnackbarVisuals
SnackbarVisuals interface that defines the visuals for a Snackbar.
Class that contains the necessary information of a particular Snackbar as a piece of the SnackbarData.
Parameters
message
text to be shown in the Snackbar
icon
optional icon to show on the start side of the Snackbar
intent
background color, note that the surfaceInverse one is not available with the Tinted style
style
style of the Snackbar, Tinted as a lower emphasis than the Filled style
actionLabel
action label to show as button in the Snackbar
withDismissAction
a boolean to show a dismiss action in the Snackbar. This is recommended to be set to true better accessibility when a Snackbar is set with a SnackbarDuration.Indefinite
duration
shown duration of the Snackbar, will adapt for a11y context
Constructors
Link copied to clipboard
constructor(message: String, icon: SparkIcon? = null, intent: SnackbarIntent = SnackbarDefaults.intent, style: SnackbarStyle = SnackbarDefaults.style, actionLabel: String? = null, withDismissAction: Boolean = false, actionOnNewLine: Boolean = false, duration: SnackbarDuration = SnackbarDuration.Short)