-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[base-ui][docs] Remove redundant "Styled" prefix #40478
Conversation
Netlify deploy previewBundle size report |
9ec3ced
to
915882c
Compare
6910d31
to
8dd6241
Compare
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.
Looks good! This is the type of thing that deserves internal documentation. In case this ever comes up again, we can share this as a guideline we follow instead of it being "silently" defined just by the code 👍
Agree, I think that we should agree on one of the components page as the gold standard and have these types of PRs to update it, so that when we review PRs, we can compare again the gold standard (feels better than a Notion page). @samuelsycamore which component page should it be? |
8dd6241
to
3b4d395
Compare
Adding @colmtuite to the loop as it's related to the docs experience for the demos of Base UI. |
I agree on all changes. I have an open PR #40742 which focuses just on improving the functional CSS for the button demo. I'm planning to get back to that PR this afternoon. Once that is merged, I'm planning to open another PR on the Button component to address imports/aliases and how to handle theme values and theming. We could then review that and potentially use it as a guide for updating other component docs. |
A continuation of #37029. This feels much better. Open https://mui.com/base-ui/react-autocomplete/#hook, I can't imagine developers would want to use "Styled" in their actual implementation.
Base
.const Button = styled(ButtonBase)({})
makes a lot more sense to me than the opposite. The button comes first, then it's nature. I think it's easier to read when the component is first.So in https://mui.com/base-ui/react-button/#component, I think that we should rename the alias as well, the same way Radix suffix them with
Primitive
https://github.com/radix-ui/themes/blob/300260e3c3ed5fc491129b192760aad6f96c38ac/packages/radix-ui-themes/src/components/slider.tsx#L5.Preview: https://deploy-preview-40478--material-ui.netlify.app/base-ui/react-autocomplete/#hook