From a574534e3aa6181c3c3e126e51e32bd9363b0b60 Mon Sep 17 00:00:00 2001 From: Matheus Wichman Date: Thu, 22 Apr 2021 10:28:29 -0300 Subject: [PATCH 1/2] [TextField] Make the position prop required in InputAdornment --- docs/pages/api-docs/input-adornment.json | 5 ++++- docs/src/pages/guides/migration-v4/migration-v4.md | 9 +++++++++ .../material-ui/src/InputAdornment/InputAdornment.d.ts | 2 +- .../material-ui/src/InputAdornment/InputAdornment.js | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/pages/api-docs/input-adornment.json b/docs/pages/api-docs/input-adornment.json index 1d8bdcd184e7be..18c5dd1610fcb4 100644 --- a/docs/pages/api-docs/input-adornment.json +++ b/docs/pages/api-docs/input-adornment.json @@ -1,11 +1,14 @@ { "props": { + "position": { + "type": { "name": "enum", "description": "'end'
| 'start'" }, + "required": true + }, "children": { "type": { "name": "node" } }, "classes": { "type": { "name": "object" } }, "component": { "type": { "name": "elementType" } }, "disablePointerEvents": { "type": { "name": "bool" } }, "disableTypography": { "type": { "name": "bool" } }, - "position": { "type": { "name": "enum", "description": "'end'
| 'start'" } }, "sx": { "type": { "name": "object" } }, "variant": { "type": { diff --git a/docs/src/pages/guides/migration-v4/migration-v4.md b/docs/src/pages/guides/migration-v4/migration-v4.md index 9dba9813dffef0..0caa54092b156c 100644 --- a/docs/src/pages/guides/migration-v4/migration-v4.md +++ b/docs/src/pages/guides/migration-v4/migration-v4.md @@ -1236,6 +1236,15 @@ As the core components use emotion as a styled engine, the props used by emotion + ``` +- Set the InputAdornment `position` prop to `start` or `end`. Use `start` if used as the value of the `startAdornment` prop. Use `end` if used as the value of the `endAdornment` prop. + + ```diff + -Kg} /> + +Kg} /> + -Kg} /> + +Kg} /> + ``` + ### TextareaAutosize - Remove the `rows` prop, use the `minRows` prop instead. diff --git a/packages/material-ui/src/InputAdornment/InputAdornment.d.ts b/packages/material-ui/src/InputAdornment/InputAdornment.d.ts index 9feb695c427006..73ae86db7e452c 100644 --- a/packages/material-ui/src/InputAdornment/InputAdornment.d.ts +++ b/packages/material-ui/src/InputAdornment/InputAdornment.d.ts @@ -42,7 +42,7 @@ export interface InputAdornmentTypeMap

Date: Thu, 22 Apr 2021 14:56:41 -0300 Subject: [PATCH 2/2] group changes --- docs/src/pages/guides/migration-v4/migration-v4.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/pages/guides/migration-v4/migration-v4.md b/docs/src/pages/guides/migration-v4/migration-v4.md index 0caa54092b156c..852debe0ed4151 100644 --- a/docs/src/pages/guides/migration-v4/migration-v4.md +++ b/docs/src/pages/guides/migration-v4/migration-v4.md @@ -1239,10 +1239,10 @@ As the core components use emotion as a styled engine, the props used by emotion - Set the InputAdornment `position` prop to `start` or `end`. Use `start` if used as the value of the `startAdornment` prop. Use `end` if used as the value of the `endAdornment` prop. ```diff - -Kg} /> - +Kg} /> -Kg} /> + -Kg} /> +Kg} /> + +Kg} /> ``` ### TextareaAutosize