diff --git a/docs/pages/material-ui/api/text-field.json b/docs/pages/material-ui/api/text-field.json index 0a8c3f72ccb8ce..b66de57e7eecc0 100644 --- a/docs/pages/material-ui/api/text-field.json +++ b/docs/pages/material-ui/api/text-field.json @@ -66,7 +66,8 @@ "type": { "name": "union", "description": "'medium'
| 'small'
| string" - } + }, + "default": "'medium'" }, "slotProps": { "type": { diff --git a/packages/mui-material/src/TextField/TextField.d.ts b/packages/mui-material/src/TextField/TextField.d.ts index 8afd09bcf4b2e5..28f7c230e0c1dc 100644 --- a/packages/mui-material/src/TextField/TextField.d.ts +++ b/packages/mui-material/src/TextField/TextField.d.ts @@ -188,6 +188,7 @@ export interface BaseTextFieldProps SelectProps?: Partial; /** * The size of the component. + * @default 'medium' */ size?: OverridableStringUnion<'small' | 'medium', TextFieldPropsSizeOverrides>; /** diff --git a/packages/mui-material/src/TextField/TextField.js b/packages/mui-material/src/TextField/TextField.js index 4417ee05f0910a..74bf4578371872 100644 --- a/packages/mui-material/src/TextField/TextField.js +++ b/packages/mui-material/src/TextField/TextField.js @@ -431,6 +431,7 @@ TextField.propTypes /* remove-proptypes */ = { SelectProps: PropTypes.object, /** * The size of the component. + * @default 'medium' */ size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([ PropTypes.oneOf(['medium', 'small']),