diff --git a/docs/src/pages/components/autocomplete/IntegrationDownshift.js b/docs/src/pages/components/autocomplete/IntegrationDownshift.js index e53054d609511b..f64671e8008c4d 100644 --- a/docs/src/pages/components/autocomplete/IntegrationDownshift.js +++ b/docs/src/pages/components/autocomplete/IntegrationDownshift.js @@ -65,9 +65,22 @@ function renderInput(inputProps) { } renderInput.propTypes = { - classes: PropTypes.object.isRequired, + classes: PropTypes.shape({ + chip: PropTypes.string.isRequired, + container: PropTypes.string.isRequired, + divider: PropTypes.string.isRequired, + inputInput: PropTypes.string.isRequired, + inputRoot: PropTypes.string.isRequired, + paper: PropTypes.string.isRequired, + root: PropTypes.string.isRequired, + }).isRequired, InputProps: PropTypes.object, - ref: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), + ref: PropTypes.oneOfType([ + PropTypes.func, + PropTypes.shape({ + current: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.object]).isRequired, + }), + ]), }; function renderSuggestion(suggestionProps) { @@ -95,7 +108,9 @@ renderSuggestion.propTypes = { index: PropTypes.number.isRequired, itemProps: PropTypes.object.isRequired, selectedItem: PropTypes.string.isRequired, - suggestion: PropTypes.object.isRequired, + suggestion: PropTypes.shape({ + label: PropTypes.string.isRequired, + }).isRequired, }; function getSuggestions(value, { showEmpty = false } = {}) { @@ -216,7 +231,15 @@ function DownshiftMultiple(props) { } DownshiftMultiple.propTypes = { - classes: PropTypes.object.isRequired, + classes: PropTypes.shape({ + chip: PropTypes.string.isRequired, + container: PropTypes.string.isRequired, + divider: PropTypes.string.isRequired, + inputInput: PropTypes.string.isRequired, + inputRoot: PropTypes.string.isRequired, + paper: PropTypes.string.isRequired, + root: PropTypes.string.isRequired, + }).isRequired, }; const useStyles = makeStyles(theme => ({ diff --git a/docs/src/pages/components/autocomplete/IntegrationReactSelect.js b/docs/src/pages/components/autocomplete/IntegrationReactSelect.js index 97c64802176c6f..02778147ed2890 100644 --- a/docs/src/pages/components/autocomplete/IntegrationReactSelect.js +++ b/docs/src/pages/components/autocomplete/IntegrationReactSelect.js @@ -130,7 +130,12 @@ function inputComponent({ inputRef, ...props }) { } inputComponent.propTypes = { - inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), + inputRef: PropTypes.oneOfType([ + PropTypes.func, + PropTypes.shape({ + current: PropTypes.any.isRequired, + }), + ]), }; function Control(props) { @@ -166,9 +171,16 @@ Control.propTypes = { /** * The mouse down event and the innerRef to pass down to the controller element. */ - innerProps: PropTypes.object.isRequired, - innerRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.func, PropTypes.object]) - .isRequired, + innerProps: PropTypes.shape({ + onMouseDown: PropTypes.func.isRequired, + }).isRequired, + innerRef: PropTypes.oneOfType([ + PropTypes.oneOf([null]), + PropTypes.func, + PropTypes.shape({ + current: PropTypes.any.isRequired, + }), + ]).isRequired, selectProps: PropTypes.object.isRequired, }; @@ -196,12 +208,24 @@ Option.propTypes = { /** * props passed to the wrapping element for the group. */ - innerProps: PropTypes.object.isRequired, + innerProps: PropTypes.shape({ + id: PropTypes.string.isRequired, + key: PropTypes.string.isRequired, + onClick: PropTypes.func.isRequired, + onMouseMove: PropTypes.func.isRequired, + onMouseOver: PropTypes.func.isRequired, + tabIndex: PropTypes.number.isRequired, + }).isRequired, /** * Inner ref to DOM Node */ - innerRef: PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.func, PropTypes.object]) - .isRequired, + innerRef: PropTypes.oneOfType([ + PropTypes.oneOf([null]), + PropTypes.func, + PropTypes.shape({ + current: PropTypes.any.isRequired, + }), + ]).isRequired, /** * Whether the option is focused. */ @@ -285,7 +309,11 @@ function MultiValue(props) { MultiValue.propTypes = { children: PropTypes.node, isFocused: PropTypes.bool.isRequired, - removeProps: PropTypes.object.isRequired, + removeProps: PropTypes.shape({ + onClick: PropTypes.func.isRequired, + onMouseDown: PropTypes.func.isRequired, + onTouchEnd: PropTypes.func.isRequired, + }).isRequired, selectProps: PropTypes.object.isRequired, }; diff --git a/docs/src/pages/components/breadcrumbs/RouterBreadcrumbs.js b/docs/src/pages/components/breadcrumbs/RouterBreadcrumbs.js index 1cba3c38c0f9b7..6e28a061bcd33f 100644 --- a/docs/src/pages/components/breadcrumbs/RouterBreadcrumbs.js +++ b/docs/src/pages/components/breadcrumbs/RouterBreadcrumbs.js @@ -120,7 +120,11 @@ class RouterBreadcrumbs extends React.Component { } RouterBreadcrumbs.propTypes = { - classes: PropTypes.object.isRequired, + classes: PropTypes.shape({ + lists: PropTypes.string.isRequired, + nested: PropTypes.string.isRequired, + root: PropTypes.string.isRequired, + }).isRequired, }; export default withStyles(styles)(RouterBreadcrumbs); diff --git a/docs/src/pages/components/snackbars/ConsecutiveSnackbars.js b/docs/src/pages/components/snackbars/ConsecutiveSnackbars.js index ac0448641a2a0d..0dc2119fe20f4d 100644 --- a/docs/src/pages/components/snackbars/ConsecutiveSnackbars.js +++ b/docs/src/pages/components/snackbars/ConsecutiveSnackbars.js @@ -97,7 +97,9 @@ class ConsecutiveSnackbars extends React.Component { } ConsecutiveSnackbars.propTypes = { - classes: PropTypes.object.isRequired, + classes: PropTypes.shape({ + close: PropTypes.string.isRequired, + }).isRequired, }; export default withStyles(styles)(ConsecutiveSnackbars); diff --git a/docs/src/pages/components/tables/ReactVirtualizedTable.js b/docs/src/pages/components/tables/ReactVirtualizedTable.js index 6096aad8bfd96d..92e23eda0ed169 100644 --- a/docs/src/pages/components/tables/ReactVirtualizedTable.js +++ b/docs/src/pages/components/tables/ReactVirtualizedTable.js @@ -113,8 +113,21 @@ class MuiVirtualizedTable extends React.PureComponent { } MuiVirtualizedTable.propTypes = { - classes: PropTypes.object.isRequired, - columns: PropTypes.arrayOf(PropTypes.object).isRequired, + classes: PropTypes.shape({ + flexContainer: PropTypes.string.isRequired, + noClick: PropTypes.string.isRequired, + tableCell: PropTypes.string.isRequired, + tableRow: PropTypes.string.isRequired, + tableRowHover: PropTypes.string.isRequired, + }).isRequired, + columns: PropTypes.arrayOf( + PropTypes.shape({ + dataKey: PropTypes.string.isRequired, + label: PropTypes.string.isRequired, + numeric: PropTypes.bool, + width: PropTypes.number.isRequired, + }), + ).isRequired, headerHeight: PropTypes.number, onRowClick: PropTypes.func, rowHeight: PropTypes.number, diff --git a/docs/src/pages/styles/basics/HigherOrderComponent.js b/docs/src/pages/styles/basics/HigherOrderComponent.js index a9114acc560765..b5dc344731ecfa 100644 --- a/docs/src/pages/styles/basics/HigherOrderComponent.js +++ b/docs/src/pages/styles/basics/HigherOrderComponent.js @@ -21,7 +21,9 @@ function HigherOrderComponent(props) { } HigherOrderComponent.propTypes = { - classes: PropTypes.object.isRequired, + classes: PropTypes.shape({ + root: PropTypes.string.isRequired, + }).isRequired, }; export default withStyles(styles)(HigherOrderComponent);