create global toast def

This commit is contained in:
cv
2021-04-10 11:29:52 +02:00
parent f06bbc668d
commit d289a5b918
@@ -0,0 +1,16 @@
import { createStandaloneToast } from '@chakra-ui/react';
const toast = createStandaloneToast();
// const customToast = createStandaloneToast({ theme: yourCustomTheme })
// error toast
export const showErrorToast = (title, description) => {
toast({
title: title,
description: description,
position: 'top-left',
variant: 'subtle',
status: 'error',
isClosable: true,
});
};