SnackbarOwnProps

Types

Link copied to clipboard
interface SlotProps

Properties

Link copied to clipboard
abstract var autoHideDuration: Number?

The number of milliseconds to wait before automatically calling the onClose function. onClose should then set the state of the open prop to hide the Snackbar. This behavior is disabled by default with the null value.

Link copied to clipboard
abstract override var children: ReactNode?
Link copied to clipboard

If true, the autoHideDuration timer will expire even if the window is not focused.

Link copied to clipboard
abstract var exited: Boolean?

The prop used to handle exited transition and unmount the component.

Link copied to clipboard
abstract var key: Key?
Link copied to clipboard
abstract var onClose: (event: SyntheticEvent<*, *>?, reason: SnackbarCloseReason) -> Unit?

Callback fired when the component requests to be closed. Typically onClose is used to set state in the parent component, which is used to control the Snackbar open prop. The reason parameter can optionally be used to control the response to onClose, for example ignoring clickaway.

Link copied to clipboard
abstract var open: Boolean?

If true, the component is shown.

Link copied to clipboard
abstract var resumeHideDuration: Number?

The number of milliseconds to wait before dismissing after user interaction. If autoHideDuration prop isn't specified, it does nothing. If autoHideDuration prop is specified but resumeHideDuration isn't, we default to autoHideDuration / 2 ms.

Link copied to clipboard

The props used for each slot inside the Snackbar.

Link copied to clipboard
abstract var slots: SnackbarSlots?

The components used for each slot inside the Snackbar. Either a string to use a HTML element or a component.

Functions

Link copied to clipboard
open inline fun <P : Props> child(type: ElementType<P>, props: P)
Link copied to clipboard
open inline operator fun <P : Props> ElementType<P>.invoke()
open inline operator fun <T> ContextType<T>.invoke(noinline block: ProviderProps<T>.() -> Unit)
open inline operator fun <P : Props> ElementType<P>.invoke(noinline block: P.() -> Unit)
open inline operator fun <T> ContextType<T>.invoke(value: T, noinline block: ChildrenBuilder.() -> Unit)
open inline operator fun <T> Provider<T>.invoke(value: T, noinline block: ChildrenBuilder.() -> Unit)
Link copied to clipboard
open inline operator fun Char.unaryPlus()
open inline operator fun String?.unaryPlus()
open inline operator fun ReactNode?.unaryPlus()
open inline operator fun Props?.unaryPlus()