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.
kindβ
childrenβ
Feedbackβ
To report a problem or suggest changes, use our improvements form or, if you prefer, open an issue on our Github repository.