Renders a SnackBar module.

Parameters:
NameTypeDescription
propsobject

Component props.

Properties
NameTypeDescription
childrenJSX.Element

React element children.

customAttributesobject

Custom attributes for the component

customClassesstring | Array | object

Custom classes for the component.

delaynumber

The delay for the component.

idstring

The id for the component.

messagestring

The message for the component.

onDismissfunction

Callback function to run when the component is dismissed.

spacingstring | number | Array | object

The spacing for the component, as a string, number, array, or object.

themestring

The theme for the component.

typestring

The type for the component.

refobject | null

Ref to the component.

Since
  • 3.4.0
Returns:

The icon component.

Type: 
JSX.Element
Example
import SnackBar from '@gravityforms/components/react/admin/modules/SnackBar';

return <SnackBar delay={ 2000 } message="Success saving settings!" />;