diff --git a/docs/icons.md b/docs/icons.md index be89acc..dee0d71 100644 --- a/docs/icons.md +++ b/docs/icons.md @@ -59,5 +59,17 @@ toast.success("Even a function, given you return something that can be rendered" }); ``` +You can provide global custom icons through `ToastContainer`. + +```tsx +import { Icons, ToastContainer } from 'react-toastify'; + + { + if(type === 'success') return ; // return custom icon for success type + if(type === 'error') return Icons.error({theme, type}); // return default toastify icon for error type + return ; // return default icon or return false for no icon +}}/> +``` + :::info If you provide a component, the current `theme` and `type` are passed as props -::: \ No newline at end of file +:::