From 3c7edc73a2f63b4709770e6156cd5b76d2beb0ae Mon Sep 17 00:00:00 2001 From: Anurag Date: Fri, 4 Dec 2020 19:42:07 +0530 Subject: [PATCH] docs(toast): improved toast docs --- docs-templates/toast.md | 25 +++++++++++++++++++++++++ docs/toast.md | 33 +++++++++++++++++++++++++++++---- 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/docs-templates/toast.md b/docs-templates/toast.md index db06fc84f..039632fe4 100644 --- a/docs-templates/toast.md +++ b/docs-templates/toast.md @@ -10,6 +10,31 @@ the +We can utilize the `toastWrapper` prop to add animations and other wrappers +around the toast. + +Example: + +```jsx + ( + + {children} + + )} + toastTypes={{ + primary: ({ content }) => {content}, + }} +> + + +``` + +We also have to add the `animationTimeout` inorder to specify a delay before +removing the toast from the state, this would ensure the CSS or any other +animations has the chance to finish without being interrupted. +