Use Toast
amerta / amerta/theme/ui/toast / useToast
Function: useToast()
useToast(): {
error: (text) =>void;message: (__namedParameters) =>void;success: (text) =>void;toast: (text,type,preserve?,action?,onAction?) =>void;warning: (text) =>void; }
Defined in: amerta/theme/ui/toast.tsx:336
Returns
{ error: (text) => void; message: (__namedParameters) => void; success: (text) => void; toast: (text, type, preserve?, action?, onAction?) => void; warning: (text) => void; }
error()
error: (
text) =>void
Parameters
| Parameter | Type |
| ------ | ------ |
| text | string |
Returns
void
message()
message: (
__namedParameters) =>void
Parameters
| Parameter | Type |
| ------ | ------ |
| __namedParameters | Message |
Returns
void
success()
success: (
text) =>void
Parameters
| Parameter | Type |
| ------ | ------ |
| text | string |
Returns
void
toast()
toast: (
text,type,preserve?,action?,onAction?) =>void
Parameters
| Parameter | Type |
| ------ | ------ |
| text | string |
| type | "success" | "error" | "message" | "warning" |
| preserve? | boolean |
| action? | string |
| onAction? | () => void |
Returns
void
warning()
warning: (
text) =>void
Parameters
| Parameter | Type |
| ------ | ------ |
| text | string |
Returns
void