Toast simple customization #2017
-
Hello, I have a simple question regarding Toast. How can I add a margin to the top or right of a Toast, without rewriting the whole render function? Is that even possible? Ideally, I want to do something like this:
Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@akiarostami sorry for the lack of response on our part! Looks like it will need to be done in the render method of the toast. You could create a reusable component that applies the styles you want in the render method, something like this - https://codesandbox.io/s/custom-toast-render-method-um7xg?file=/src/useToast.tsx |
Beta Was this translation helpful? Give feedback.
@akiarostami sorry for the lack of response on our part!
Looks like it will need to be done in the render method of the toast. You could create a reusable component that applies the styles you want in the render method, something like this - https://codesandbox.io/s/custom-toast-render-method-um7xg?file=/src/useToast.tsx