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
Conversation
@@ -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({ |
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.
The API docs generation script requires a variable named props
to be destructured to work properly.
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.
Yep, I remember this from when I was adding the useThemeProps
. This is why the param in React.forwardRef
are called inProps
:))
|
6061ec4
to
d1872d1
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.
LGTM 👍
I am too slow 😅 |
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.