You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docs page is rendering the component ToastContainer multiple times. More exactly there will be one for each story section that appears in the docs page.
1. Go to the docs page of our Toast component: https://osstotalsoft.github.io/rocket-ui-ts/?path=/docs/components-feedback-toast--docs 2. Click the button Info Toast, or any other type of toasts. 3. Close the toast that appeared on the screen. 4. Realize that under the first toast will be another one and another one and so on. More exactly there will be one for each story section that appears in the docs page. 5. Alternatively, inspect the Document and get the number of toasts document.getElementsByClassName('Toastify').length 6. Our components solution is open source and the code can be found at: https://github.com/osstotalsoft/rocket-ui-ts
😞 What's happening: In my Toast.stories.tsx file, I am exporting 3 stories, which will appear in the docs page plus the presenting section which is by default the first story. So, in this case, 4 ToastContainers are rendered.
😃 Expected behavior: When I open a Toast, only one ToastContainer should be rendered.
PS: We use the toast from 'react-tostify'
Thank you for your help! 🌷
The text was updated successfully, but these errors were encountered:
Describe the bug
Docs page is rendering the component ToastContainer multiple times. More exactly there will be one for each story section that appears in the docs page.
Reproduction link
https://osstotalsoft.github.io/rocket-ui-ts/?path=/docs/components-feedback-toast--docs
Reproduction steps
1. Go to the docs page of our Toast component: https://osstotalsoft.github.io/rocket-ui-ts/?path=/docs/components-feedback-toast--docs
2. Click the button Info Toast, or any other type of toasts.
3. Close the toast that appeared on the screen.
4. Realize that under the first toast will be another one and another one and so on. More exactly there will be one for each story section that appears in the docs page.
5. Alternatively, inspect the Document and get the number of toasts
document.getElementsByClassName('Toastify').length
6. Our components solution is open source and the code can be found at: https://github.com/osstotalsoft/rocket-ui-ts
System
Additional context
Storybook configuration:
📝 main.js: https://github.com/osstotalsoft/rocket-ui-ts/blob/master/.storybook/main.ts
📝 preview.tsx https://github.com/osstotalsoft/rocket-ui-ts/blob/master/.storybook/preview.tsx
📝 Toast.stories.tsx https://github.com/osstotalsoft/rocket-ui-ts/blob/master/src/stories/feedback/Toast/Toast.stories.tsx
😞 What's happening: In my Toast.stories.tsx file, I am exporting 3 stories, which will appear in the docs page plus the presenting section which is by default the first story. So, in this case, 4 ToastContainers are rendered.
😃 Expected behavior: When I open a Toast, only one ToastContainer should be rendered.
PS: We use the toast from 'react-tostify'
Thank you for your help! 🌷
The text was updated successfully, but these errors were encountered: