Skip to content

Commit

Permalink
[TextField] Fix support for custom size prop value (#26585)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrPuneetGaur authored Jun 4, 2021
1 parent 3986844 commit 302ce3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion docs/pages/api-docs/input-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@
"readOnly": { "type": { "name": "bool" } },
"required": { "type": { "name": "bool" } },
"rows": { "type": { "name": "union", "description": "number<br>&#124;&nbsp;string" } },
"size": { "type": { "name": "enum", "description": "'medium'<br>&#124;&nbsp;'small'" } },
"size": {
"type": {
"name": "union",
"description": "'medium'<br>&#124;&nbsp;'small'<br>&#124;&nbsp;string"
}
},
"startAdornment": { "type": { "name": "node" } },
"sx": { "type": { "name": "object" } },
"type": { "type": { "name": "string" }, "default": "'text'" },
Expand Down
5 changes: 4 additions & 1 deletion packages/material-ui/src/InputBase/InputBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,10 @@ InputBase.propTypes /* remove-proptypes */ = {
/**
* The size of the component.
*/
size: PropTypes.oneOf(['medium', 'small']),
size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([
PropTypes.oneOf(['medium', 'small']),
PropTypes.string,
]),
/**
* Start `InputAdornment` for this component.
*/
Expand Down

0 comments on commit 302ce3b

Please sign in to comment.