-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Toaster create method should not have the inline
property hard coded
#367
Comments
What are you trying to accomplish with |
From the docs: "If true, then positioning will be relative to the parent element". I think this is the reason why toasts are centered wrong (in Firefox). Also multiple toasts are not stacked one below the other (as seen in the docs) but on top of each other. |
However, |
Toasts on Firefox 50 on the docs site work as expected, so I wonder if you're adding any additional styles? Are you setting |
Yes, if this is the souce code of the docs, https://github.com/palantir/blueprint/blob/master/packages/core/examples/toastExample.tsx, then the docs do not use the
in a loop. As far as I can see in the Firefox DOM inspector, I do not override any CSS on the toast element or its container. My CSS is minimal anyway so I can post it here:
I also use styled-components, but not with toast elements. |
I'm having the same issue. I believe @tonico is right that the Currently, multiple Toasts are not stacking. I have the inline prop explicitly set to false in my Toaster.create method.
It creates the following reactroot:
If I remove the |
The I'm sorry if this doesn't make perfect sense--it's an implementation detail of The correct fix involves ensuring that |
so they also stack when `inline`. fixes #367
Bug report
Steps to reproduce
Create a custom Toaster with
inline
set tofalse
, e.g., using code from the docs:Actual behavior
Observe the
pt-overlay-inline
class in the generated DOM element:<span data-reactroot="" class="pt-overlay pt-overlay-open pt-overlay-inline pt-toast-container pt-toast-container-top">...</span>
Expected behavior
The create method that returns a new Toaster instance should not have the
inline
property hard coded:https://github.com/palantir/blueprint/blob/release-1.3.1/packages/core/src/components/toast/toaster.tsx#L94
The text was updated successfully, but these errors were encountered: