Toast simple customization #2017
Answered
by
chasinhues
akiarostami
asked this question in
General
-
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.
Answered by
chasinhues
Jan 24, 2021
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.
1 reply
Answer selected by
chasinhues
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@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