-
-
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
[docs] Move more prop docs into IntelliSense #20342
Conversation
Details of bundle changes.Comparing: 69f7046...aa361c0 Details of page changes
|
1a09864
to
66083de
Compare
@@ -197,7 +201,7 @@ ExpansionPanel.propTypes = { | |||
*/ | |||
onChange: PropTypes.func, | |||
/** | |||
* @ignore | |||
* If `true`, rounded corners are disabled. |
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.
We could keep ignoring this but I would argue that it's better to document this here since the classes reference it directly ("rounded is applied if square={false}
").
@@ -27,15 +27,13 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | |||
| <span class="prop-name">autoComplete</span> | <span class="prop-type">string</span> | | This prop helps users to fill forms faster, especially on mobile devices. The name can be confusing, as it's more like an autofill. You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill). | | |||
| <span class="prop-name">autoFocus</span> | <span class="prop-type">bool</span> | | If `true`, the `input` element will be focused during the first mount. | | |||
| <span class="prop-name">classes</span> | <span class="prop-type">object</span> | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | |||
| <span class="prop-name">className</span> | <span class="prop-type">string</span> | | The CSS class name of the wrapper element. | |
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.
className
doesn't add much here. It's forwarded to the root element like any other excess attribute.
92fb51e
to
92cbed7
Compare
/** | ||
* @ignore | ||
*/ | ||
className: PropTypes.string, | ||
/** | ||
* A control element. For instance, it can be be a `Radio`, a `Switch` or a `Checkbox`. | ||
*/ | ||
control: PropTypes.element, | ||
control: PropTypes.element.isRequired, |
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.
This was incorrect. We call cloneElement
on the value. The TypeScript types were correct
@@ -573,7 +578,7 @@ Popover.propTypes = { | |||
/** | |||
* Props applied to the [`Paper`](/api/paper/) element. | |||
*/ | |||
PaperProps: PropTypes.shape({ | |||
PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({ |
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 may be possible to express this at the type level but this would reject our own components (React.ComponentType) that would work at runtime.
Hey @eps1lon where can I read on why some props (like StepLabel Those were documented in 4.8, and at first glance I can't see any implementation logic that has changed. |
They were typed, but not documented: https://v4-0-2.material-ui.com/api/step-label/#props. Please open a new issue explaining your use case. |
Includes a bunch of type fixes that might cause new TypeScript errors:
children
. They have no effect.icon
andemptyIcon
toReact.ReactNode
(fromReact.ReactElement
)emptyLabelText
undefined
andnull
fromchildren
. This would cause a runtime errorchildren
. They have no effect.renderSuffix
renderPrefix
. This would cause a runtime warning. It was likely mistaken forrenderSuffix
children
. They have no effectchildren
. They have no effectclasses
proptheme
. It has no effect.children
. They have no effect.children
. They have no effect.connect
toReact.ReactElement
(fromReact.ReactNode
). Arbitrary nodes would cause a crash.The following components need more work. I'll leave them be for now: