Skip to content
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

Merged
merged 3 commits into from May 3, 2022
Merged

Add containerPosition prop for ToastContainer #6316

merged 3 commits into from May 3, 2022

Conversation

tkesgar
Copy link
Contributor

@tkesgar tkesgar commented May 1, 2022

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.

Copy link
Collaborator

@golota60 golota60 left a 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

@@ -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.
Copy link
Collaborator

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)

Copy link
Contributor Author

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.

@golota60 golota60 self-requested a review May 3, 2022 13:39
Copy link
Collaborator

@golota60 golota60 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks! 😄

@kyletsang kyletsang linked an issue May 3, 2022 that may be closed by this pull request
@kyletsang kyletsang merged commit 9815957 into react-bootstrap:master May 3, 2022
@kyletsang
Copy link
Member

Thanks!

@tkesgar tkesgar deleted the position-props-for-toast-container branch May 4, 2022 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not add position-absolute if className has position-* Option for Toast to be position: fixed
3 participants