admin管理员组文章数量:1394217
version of library "@radix-ui/themes": "^3.1.6" "react-toastify": "^11.0.3"
if radix-themes dialog is open(dialog.content), toast is appears after dialog. so toast is unclickable,,, what am i wrong for this code?
App.tsx
function App() {
return (
<>
<Theme
accentColor="cyan"
grayColor="slate"
panelBackground="solid"
scaling="100%"
radius="small"
>
<QueryClientProvider client={myQueryClient}>
<CookiesProvider>
<Provider>
<RouterProvider router={router} />
<ReactQueryDevtools />
</Provider>
</CookiesProvider>
</QueryClientProvider>
</Theme>
<ToastContainer
position="bottom-right"
autoClose={5000}
newestOnTop={false}
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
theme="colored"
limit={3}
toastStyle={{
fontFamily: "Pretendard",
fontWeight: "normal",
fontSize: 14,
}}
/>
</>
);
}
- case ( toastify's toast is unclickable )
i Tried change toast Container z-index to high number but it doesn't work. Does it have anything to do with the dialog's portal?
version of library "@radix-ui/themes": "^3.1.6" "react-toastify": "^11.0.3"
if radix-themes dialog is open(dialog.content), toast is appears after dialog. so toast is unclickable,,, what am i wrong for this code?
App.tsx
function App() {
return (
<>
<Theme
accentColor="cyan"
grayColor="slate"
panelBackground="solid"
scaling="100%"
radius="small"
>
<QueryClientProvider client={myQueryClient}>
<CookiesProvider>
<Provider>
<RouterProvider router={router} />
<ReactQueryDevtools />
</Provider>
</CookiesProvider>
</QueryClientProvider>
</Theme>
<ToastContainer
position="bottom-right"
autoClose={5000}
newestOnTop={false}
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
theme="colored"
limit={3}
toastStyle={{
fontFamily: "Pretendard",
fontWeight: "normal",
fontSize: 14,
}}
/>
</>
);
}
- case ( toastify's toast is unclickable )
i Tried change toast Container z-index to high number but it doesn't work. Does it have anything to do with the dialog's portal?
Share Improve this question asked Mar 13 at 4:49 Jay BeemoJay Beemo 111 Answer
Reset to default 0z-index
only works within the same stacking context. Your ToastContainer
is outside the dialog's stacking context, its z-index
won't have any effect on the dialog's content.
The simplest solution is to move the <ToastContainer>
component inside the <Theme>
component.
function App() {
return (
<Theme
accentColor="cyan"
grayColor="slate"
panelBackground="solid"
scaling="100%"
radius="small"
>
<QueryClientProvider client={myQueryClient}>
<CookiesProvider>
<Provider>
<RouterProvider router={router} />
<ReactQueryDevtools />
<ToastContainer
position="bottom-right"
autoClose={5000}
newestOnTop={false}
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
theme="colored"
limit={3}
toastStyle={{
fontFamily: "Pretendard",
fontWeight: "normal",
fontSize: 14,
}}
/>
</Provider>
</CookiesProvider>
</QueryClientProvider>
</Theme>
);
}
本文标签: toasify39s toast appears behind radixthemes39 dialogStack Overflow
版权声明:本文标题:toasify's toast appears behind radix-themes' dialog - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744719906a2621634.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论