2
0
Files
bot/apps/builder/components/shared/hooks/useToast.tsx
2022-09-27 08:30:42 +02:00

23 lines
402 B
TypeScript

import { useToast as useChakraToast, UseToastOptions } from '@chakra-ui/react'
export const useToast = () => {
const toast = useChakraToast()
const showToast = ({
title,
description,
status = 'error',
...props
}: UseToastOptions) => {
toast({
position: 'bottom-right',
description,
title,
status,
...props,
})
}
return { showToast }
}