UNPKG

toastify-react-native

Version:

🎉 toastify-react-native allows you to add notifications to your react-native app (ios, android) with ease. No more nonsense!

18 lines (14 loc) • 755 B
import React from 'react' import { ToastConfig, ToastConfigParams } from './interfaces' import SuccessToast from '../components/SuccessToast' import ErrorToast from '../components/ErrorToast' import InfoToast from '../components/InfoToast' import WarnToast from '../components/WarnToast' const defaultConfig: ToastConfig = { success: (props: ToastConfigParams) => React.createElement(SuccessToast, props), error: (props: ToastConfigParams) => React.createElement(ErrorToast, props), info: (props: ToastConfigParams) => React.createElement(InfoToast, props), warn: (props: ToastConfigParams) => React.createElement(WarnToast, props), default: (props: ToastConfigParams) => React.createElement(InfoToast, props), } export default defaultConfig