-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[docs] Base Popper style revisions and final review #32412
[docs] Base Popper style revisions and final review #32412
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.
🎉
By default, the popper is mounted to the DOM when its `open` prop is set to `true` and removed from it when `open` turns `false`. If you want that to happen with a transition, use the `keepMounted` prop (see the [Transition](#transition) example below). | ||
`anchorEl` is passed as the reference object to create a new `Popper.js` instance. | ||
The children are placed in a [`Portal`](/base/react-portal/) prepended to the body of the document to avoid rendering problems. | ||
You can disable this behavior with `disablePortal` prop. | ||
|
||
{{"demo": "SimplePopper.js"}} |
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.
Hi @samuelsycamore , I was going through the docs on the main website and noticed that in the SimplePopper
demo, the popper is not visible in dark mode - https://mui.com/base/react-popper/#basic-popper.
I think we need to simply remove the backgroundColor: '#fff'
style applied in the child div for it to work in both modes. In dark mode, the background overlaps with the white text.
Found this PR, so commenting here. It can probably be fixed in this PR.
Preview: https://deploy-preview-32412--material-ui.netlify.app/base/react-popper/#basic-popper
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.
@ZeeshanTamboli nice catch! I think we can open a dedicated PR for this, as this PR is mostly focused on the copy writing.
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.
🚢 it :)
This PR reviews the Base
PopperUnstyled
document. The current version is mostly copypasta from the Material UI doc, so I did a fair bit of rewriting to make it a proper standalone piece. The "Features" section felt more like a list of random details, so I reworked it and dispersed those details throughout the doc.The earlier version mentions transitions and links to a section that doesn't exist—looks like this was pulled directly from the Material UI doc. So I grabbed the text about transitions from that piece and added it here. I'm thinking we should probably add a Base version of the corresponding demo as well.