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
Add containerPosition prop for ToastContainer #6316
Add containerPosition prop for ToastContainer #6316
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, only one small issue/nitpick
src/ToastContainer.tsx
Outdated
@@ -41,6 +42,13 @@ const propTypes = { | |||
'bottom-center', | |||
'bottom-end', | |||
]), | |||
|
|||
/** | |||
* By default the container is rendered with `position-absolute` utility class. Provide a string to use other `position-*` utility classes, or `false` to remove it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or
false
to remove it.
Doesn't this accept only strings?
I think providing an empty string would achieve what you want here 😄 (also it could be a good idea to add a test for that)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh forget to update this 🙈 I initially allow false
to remove the position-*
class, but I feel it is simpler to just use "static"
or whatever utility class. Using an empty string should work as well, I'll update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks! 😄
Thanks! |
Fixes #6315.
I am unsure whether we should strictly limit the containerPosition values to position-* utility classes or allow any string, because it is possible to customize the utility classes.