Toasts in the style of ui-kitten for modern react-native applications.
yarn add ui-kitten-toast
Add the ToastProvider
in your app main file, but below ui-kittens ApplicationProvider
!
<ApplicationProvider {...eva} theme={eva.light}>
<ToastProvider>
...
</ToastProvider>
</ApplicationProvider>
Use the useToast
hook wherever you want to show a toast.
const { showToast } = useToast();
showToast({ status: 'danger', message: 'Some error :c' });
status
: Any status that a ui-kittencard
would accept.message
:string
orReactNode
.
Be aware that this is a very early alpha. Feel free to contribute or suggest more features