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

[core] Exclude documentation of Base props not used in styled libraries #35562

Merged
merged 2 commits into from Dec 21, 2022

Conversation

michaldudak
Copy link
Member

The Popper component has a direction prop documented, even though this prop exists only in the PopperUnstyled props. This PR makes sure that omitted props are not taken into consideration when building the API docs.

@michaldudak michaldudak added the scope: docs-infra Specific to the docs-infra product label Dec 21, 2022
@@ -49,11 +49,13 @@ const Popper = React.forwardRef(function Popper(
ref: React.ForwardedRef<HTMLDivElement>,
) {
const theme = useTheme<{ direction?: Direction }>();
const { components, componentsProps, slots, slotProps, ...other } = useThemeProps({
const props = useThemeProps({
Copy link
Member Author

Choose a reason for hiding this comment

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

The API docs generation script requires a variable named props to be destructured to work properly.

Copy link
Member

@mnajdova mnajdova Dec 21, 2022

Choose a reason for hiding this comment

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

Yep, I remember this from when I was adding the useThemeProps. This is why the param in React.forwardRef are called inProps :))

@mui-bot
Copy link

mui-bot commented Dec 21, 2022

Messages
📖 Netlify deploy preview: https://deploy-preview-35562--material-ui.netlify.app/

No bundle size changes

Generated by 🚫 dangerJS against d1872d1

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@michaldudak michaldudak merged commit fa62bf3 into mui:master Dec 21, 2022
@michaldudak michaldudak deleted the exclude-base-props branch December 21, 2022 14:09
@siriwatknp
Copy link
Member

I am too slow 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants