Closed QzCurious closed 1 year ago
Hi there!
The problem comes from the ToastWrapper trying to determine the height of its content, which is not possible if it is set to position absolute. As long as there is no height, it assumes the content is not ready yet so it defaults to opacity 0.
If you want to give your toasts an absolute position you can either:
<Toaster containerStyle={{ position: "absolute" }}/>
useToaster()
for full flexibilityRelated #229
I made a codesandbox for this here.
What I were trying to achieve is let toast follow mouse click position. So I need to set the
position
toabsolute
orfixed
and{ left: e.clientX, top: e.clientY }
. Either settingposition
byclassName
orstyle
cause the toast element always opacity 0.