Toast
Import
import { Toast } from '@resultadosdigitais/tangram-components'
Properties
delay
| Type | number |
|---|---|
| Default | undefined |
Description
Sets the number of milliseconds to wait before automatically calling the onClose function. onClose should be passed by props.
message
| Type | string | node |
|---|---|
| Default | '' |
Description
Sets if content of Toast will be customizable.
// Can be a string:
<Toast title="Toast title" message="Toast message content" />
// Or a node as like Toast.Text:
<Toast
title="Toast title"
message={<Toast.Text>Toast message content</Toast.Text>}
/>
title
kind
show 🗑️
| Concerns | 🗑️ Deprecated: - Use `hide` property instead. |
|---|---|
| Type | bool |
| Default | true |
Description
Sets when the Toast will be shown or not.
hide
onClose
| Type | func |
|---|---|
| Default | () => {} |
| Param | event React.SyntheticEvent - The event source of the callback. |
Description
Callback fired when the Toast closure is requested, and before starting the animation, like when the close button is clicked.
onRemoved
| Type | func |
|---|---|
| Default | () => {} |
| Param | event React.SyntheticEvent - The event source of the callback. |
Description
Callback fired when the Toast is completely removed (after animation).
dismissible 🗑️
| Concerns | 🗑️ Deprecated: - Use `irremovable` property instead. |
|---|---|
| Type | bool |
| Default | true |
Description
Sets if the Toast is dismissible making available a button that when clicked closes the snackbar.
irremovable
icon
children
action 🗑️
<ToastProvider />
Import
import { ToastProvider } from '@resultadosdigitais/tangram-components'
Properties
delay
| Type | number |
|---|---|
| Default | 7000 |
Description
Sets the number of milliseconds to wait before automatically calling the onClose function. onClose should be passed by props.
This behavior is disabled by default.