Skip to content
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] Fix few propTypes in Inputs #23331

Merged
merged 4 commits into from Oct 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/pages/api-docs/checkbox.md
Expand Up @@ -36,7 +36,7 @@ The `MuiCheckbox` name can be used for providing [default props](/customization/
| <span class="prop-name">disableRipple</span> | <span class="prop-type">bool</span> | | If `true`, the ripple effect is disabled. |
| <span class="prop-name">icon</span> | <span class="prop-type">node</span> | <span class="prop-default">&lt;CheckBoxOutlineBlankIcon /></span> | The icon to display when the component is unchecked. |
| <span class="prop-name">id</span> | <span class="prop-type">string</span> | | The id of the `input` element. |
| <span class="prop-name">indeterminate</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the component appears indeterminate. This does not set the native input element to indeterminate due to inconsistent behavior across browsers. However, we set a `data-indeterminate` attribute on the input. |
| <span class="prop-name">indeterminate</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the component appears indeterminate. This does not set the native input element to indeterminate due to inconsistent behavior across browsers. However, we set a `data-indeterminate` attribute on the `input`. |
| <span class="prop-name">indeterminateIcon</span> | <span class="prop-type">node</span> | <span class="prop-default">&lt;IndeterminateCheckBoxIcon /></span> | The icon to display when the component is indeterminate. |
| <span class="prop-name">inputProps</span> | <span class="prop-type">object</span> | | [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. |
| <span class="prop-name">inputRef</span> | <span class="prop-type">ref</span> | | Pass a ref to the `input` element. |
Expand Down
6 changes: 3 additions & 3 deletions docs/pages/api-docs/filled-input.md
Expand Up @@ -36,8 +36,8 @@ The `MuiFilledInput` name can be used for providing [default props](/customizati
| <span class="prop-name">disabled</span> | <span class="prop-type">bool</span> | | If `true`, the `input` element is disabled. The prop defaults to the value (`false`) inherited from the parent FormControl component. |
| <span class="prop-name">disableUnderline</span> | <span class="prop-type">bool</span> | | If `true`, the input will not have an underline. |
| <span class="prop-name">endAdornment</span> | <span class="prop-type">node</span> | | End `InputAdornment` for this component. |
| <span class="prop-name">error</span> | <span class="prop-type">bool</span> | | If `true`, the input will indicate an error. The prop defaults to the value (`false`) inherited from the parent FormControl component. |
| <span class="prop-name">fullWidth</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the input will take up the full width of its container. |
| <span class="prop-name">error</span> | <span class="prop-type">bool</span> | | If `true`, the `input` will indicate an error. The prop defaults to the value (`false`) inherited from the parent FormControl component. |
| <span class="prop-name">fullWidth</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the `input` will take up the full width of its container. |
| <span class="prop-name">id</span> | <span class="prop-type">string</span> | | The id of the `input` element. |
| <span class="prop-name">inputComponent</span> | <span class="prop-type">elementType</span> | <span class="prop-default">'input'</span> | The component used for the `input` element. Either a string to use a HTML element or a component. |
| <span class="prop-name">inputProps</span> | <span class="prop-type">object</span> | | [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. |
Expand All @@ -48,7 +48,7 @@ The `MuiFilledInput` name can be used for providing [default props](/customizati
| <span class="prop-name">multiline</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, a `textarea` element is rendered. |
| <span class="prop-name">name</span> | <span class="prop-type">string</span> | | Name attribute of the `input` element. |
| <span class="prop-name">onChange</span> | <span class="prop-type">func</span> | | Callback fired when the value is changed.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback. You can pull out the new value by accessing `event.target.value` (string). |
| <span class="prop-name">placeholder</span> | <span class="prop-type">string</span> | | The short hint displayed in the input before the user enters a value. |
| <span class="prop-name">placeholder</span> | <span class="prop-type">string</span> | | The short hint displayed in the `input` before the user enters a value. |
| <span class="prop-name">readOnly</span> | <span class="prop-type">bool</span> | | It prevents the user from changing the value of the field (not from interacting with the field). |
| <span class="prop-name">required</span> | <span class="prop-type">bool</span> | | If `true`, the `input` element is required. The prop defaults to the value (`false`) inherited from the parent FormControl component. |
| <span class="prop-name">rows</span> | <span class="prop-type">number<br>&#124;&nbsp;string</span> | | Number of rows to display when multiline option is set to true. |
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api-docs/form-control.md
Expand Up @@ -59,7 +59,7 @@ The `MuiFormControl` name can be used for providing [default props](/customizati
| <span class="prop-name">fullWidth</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the component will take up the full width of its container. |
| <span class="prop-name">hiddenLabel</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the label is hidden. This is used to increase density for a `FilledInput`. Be sure to add `aria-label` to the `input` element. |
| <span class="prop-name">margin</span> | <span class="prop-type">'dense'<br>&#124;&nbsp;'none'<br>&#124;&nbsp;'normal'</span> | <span class="prop-default">'none'</span> | If `dense` or `normal`, will adjust vertical spacing of this and contained components. |
| <span class="prop-name">required</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the label will indicate that the input is required. |
| <span class="prop-name">required</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the label will indicate that the `input` is required. |
| <span class="prop-name">size</span> | <span class="prop-type">'medium'<br>&#124;&nbsp;'small'</span> | | The size of the text field. |
| <span class="prop-name">variant</span> | <span class="prop-type">'filled'<br>&#124;&nbsp;'outlined'<br>&#124;&nbsp;'standard'</span> | <span class="prop-default">'standard'</span> | The variant to use. |

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api-docs/form-label.md
Expand Up @@ -36,7 +36,7 @@ The `MuiFormLabel` name can be used for providing [default props](/customization
| <span class="prop-name">error</span> | <span class="prop-type">bool</span> | | If `true`, the label should be displayed in an error state. |
| <span class="prop-name">filled</span> | <span class="prop-type">bool</span> | | If `true`, the label should use filled classes key. |
| <span class="prop-name">focused</span> | <span class="prop-type">bool</span> | | If `true`, the input of this label is focused (used by `FormGroup` components). |
| <span class="prop-name">required</span> | <span class="prop-type">bool</span> | | If `true`, the label will indicate that the input is required. |
| <span class="prop-name">required</span> | <span class="prop-type">bool</span> | | If `true`, the label will indicate that the `input` is required. |

The `ref` is forwarded to the root element.

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/api-docs/input-adornment.md
Expand Up @@ -31,7 +31,7 @@ The `MuiInputAdornment` name can be used for providing [default props](/customiz
| <span class="prop-name">children</span> | <span class="prop-type">node</span> | | The content of the component, normally an `IconButton` or string. |
| <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">component</span> | <span class="prop-type">elementType</span> | <span class="prop-default">'div'</span> | The component used for the root node. Either a string to use a HTML element or a component. |
| <span class="prop-name">disablePointerEvents</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | Disable pointer events on the root. This allows for the content of the adornment to focus the input on click. |
| <span class="prop-name">disablePointerEvents</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | Disable pointer events on the root. This allows for the content of the adornment to focus the `input` on click. |
| <span class="prop-name">disableTypography</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If children is a string then disable wrapping in a Typography component. |
| <span class="prop-name">position</span> | <span class="prop-type">'end'<br>&#124;&nbsp;'start'</span> | | The position this adornment should appear relative to the `Input`. |
| <span class="prop-name">variant</span> | <span class="prop-type">'filled'<br>&#124;&nbsp;'outlined'<br>&#124;&nbsp;'standard'</span> | | The variant to use. Note: If you are using the `TextField` component or the `FormControl` component you do not have to set this manually. |
Expand Down
8 changes: 4 additions & 4 deletions docs/pages/api-docs/input-base.md
Expand Up @@ -37,8 +37,8 @@ The `MuiInputBase` name can be used for providing [default props](/customization
| <span class="prop-name">defaultValue</span> | <span class="prop-type">any</span> | | The default `input` element value. Use when the component is not controlled. |
| <span class="prop-name">disabled</span> | <span class="prop-type">bool</span> | | If `true`, the `input` element is disabled. The prop defaults to the value (`false`) inherited from the parent FormControl component. |
| <span class="prop-name">endAdornment</span> | <span class="prop-type">node</span> | | End `InputAdornment` for this component. |
| <span class="prop-name">error</span> | <span class="prop-type">bool</span> | | If `true`, the input will indicate an error. The prop defaults to the value (`false`) inherited from the parent FormControl component. |
| <span class="prop-name">fullWidth</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the input will take up the full width of its container. |
| <span class="prop-name">error</span> | <span class="prop-type">bool</span> | | If `true`, the `input` will indicate an error. The prop defaults to the value (`false`) inherited from the parent FormControl component. |
| <span class="prop-name">fullWidth</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the `input` will take up the full width of its container. |
| <span class="prop-name">id</span> | <span class="prop-type">string</span> | | The id of the `input` element. |
| <span class="prop-name">inputComponent</span> | <span class="prop-type">element type</span> | <span class="prop-default">'input'</span> | The component used for the `input` element. Either a string to use a HTML element or a component.<br>⚠️ [Needs to be able to hold a ref](/guides/composition/#caveat-with-refs). |
| <span class="prop-name">inputProps</span> | <span class="prop-type">object</span> | <span class="prop-default">{}</span> | [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. |
Expand All @@ -48,9 +48,9 @@ The `MuiInputBase` name can be used for providing [default props](/customization
| <span class="prop-name">minRows</span> | <span class="prop-type">number<br>&#124;&nbsp;string</span> | | Minimum number of rows to display when multiline option is set to true. |
| <span class="prop-name">multiline</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, a `textarea` element is rendered. |
| <span class="prop-name">name</span> | <span class="prop-type">string</span> | | Name attribute of the `input` element. |
| <span class="prop-name">onBlur</span> | <span class="prop-type">func</span> | | Callback fired when the input is blurred.<br>Notice that the first argument (event) might be undefined. |
| <span class="prop-name">onBlur</span> | <span class="prop-type">func</span> | | Callback fired when the `input` is blurred.<br>Notice that the first argument (event) might be undefined. |
| <span class="prop-name">onChange</span> | <span class="prop-type">func</span> | | Callback fired when the value is changed.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback. You can pull out the new value by accessing `event.target.value` (string). |
| <span class="prop-name">placeholder</span> | <span class="prop-type">string</span> | | The short hint displayed in the input before the user enters a value. |
| <span class="prop-name">placeholder</span> | <span class="prop-type">string</span> | | The short hint displayed in the `input` before the user enters a value. |
| <span class="prop-name">readOnly</span> | <span class="prop-type">bool</span> | | It prevents the user from changing the value of the field (not from interacting with the field). |
| <span class="prop-name">required</span> | <span class="prop-type">bool</span> | | If `true`, the `input` element is required. The prop defaults to the value (`false`) inherited from the parent FormControl component. |
| <span class="prop-name">rows</span> | <span class="prop-type">number<br>&#124;&nbsp;string</span> | | Number of rows to display when multiline option is set to true. |
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/api-docs/input-label.md
Expand Up @@ -34,9 +34,9 @@ The `MuiInputLabel` name can be used for providing [default props](/customizatio
| <span class="prop-name">disableAnimation</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the transition animation is disabled. |
| <span class="prop-name">disabled</span> | <span class="prop-type">bool</span> | | If `true`, apply disabled class. |
| <span class="prop-name">error</span> | <span class="prop-type">bool</span> | | If `true`, the label is displayed in an error state. |
| <span class="prop-name">focused</span> | <span class="prop-type">bool</span> | | If `true`, the input of this label is focused. |
| <span class="prop-name">focused</span> | <span class="prop-type">bool</span> | | If `true`, the `input` of this label is focused. |
| <span class="prop-name">margin</span> | <span class="prop-type">'dense'</span> | | If `dense`, will adjust vertical spacing. This is normally obtained via context from FormControl. |
| <span class="prop-name">required</span> | <span class="prop-type">bool</span> | | if `true`, the label will indicate that the input is required. |
| <span class="prop-name">required</span> | <span class="prop-type">bool</span> | | if `true`, the label will indicate that the `input` is required. |
| <span class="prop-name">shrink</span> | <span class="prop-type">bool</span> | | If `true`, the label is shrunk. |
| <span class="prop-name">variant</span> | <span class="prop-type">'filled'<br>&#124;&nbsp;'outlined'<br>&#124;&nbsp;'standard'</span> | | The variant to use. |

Expand Down
8 changes: 4 additions & 4 deletions docs/pages/api-docs/input.md
Expand Up @@ -34,10 +34,10 @@ The `MuiInput` name can be used for providing [default props](/customization/glo
| <span class="prop-name">color</span> | <span class="prop-type">'primary'<br>&#124;&nbsp;'secondary'</span> | | The color of the component. It supports those theme colors that make sense for this component. The prop defaults to the value (`'primary'`) inherited from the parent FormControl component. |
| <span class="prop-name">defaultValue</span> | <span class="prop-type">any</span> | | The default `input` element value. Use when the component is not controlled. |
| <span class="prop-name">disabled</span> | <span class="prop-type">bool</span> | | If `true`, the `input` element is disabled. The prop defaults to the value (`false`) inherited from the parent FormControl component. |
| <span class="prop-name">disableUnderline</span> | <span class="prop-type">bool</span> | | If `true`, the input will not have an underline. |
| <span class="prop-name">disableUnderline</span> | <span class="prop-type">bool</span> | | If `true`, the `input` will not have an underline. |
| <span class="prop-name">endAdornment</span> | <span class="prop-type">node</span> | | End `InputAdornment` for this component. |
| <span class="prop-name">error</span> | <span class="prop-type">bool</span> | | If `true`, the input will indicate an error. The prop defaults to the value (`false`) inherited from the parent FormControl component. |
| <span class="prop-name">fullWidth</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the input will take up the full width of its container. |
| <span class="prop-name">error</span> | <span class="prop-type">bool</span> | | If `true`, the `input` will indicate an error. The prop defaults to the value (`false`) inherited from the parent FormControl component. |
| <span class="prop-name">fullWidth</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, the `input` will take up the full width of its container. |
| <span class="prop-name">id</span> | <span class="prop-type">string</span> | | The id of the `input` element. |
| <span class="prop-name">inputComponent</span> | <span class="prop-type">elementType</span> | <span class="prop-default">'input'</span> | The component used for the `input` element. Either a string to use a HTML element or a component. |
| <span class="prop-name">inputProps</span> | <span class="prop-type">object</span> | | [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element. |
Expand All @@ -48,7 +48,7 @@ The `MuiInput` name can be used for providing [default props](/customization/glo
| <span class="prop-name">multiline</span> | <span class="prop-type">bool</span> | <span class="prop-default">false</span> | If `true`, a `textarea` element is rendered. |
| <span class="prop-name">name</span> | <span class="prop-type">string</span> | | Name attribute of the `input` element. |
| <span class="prop-name">onChange</span> | <span class="prop-type">func</span> | | Callback fired when the value is changed.<br><br>**Signature:**<br>`function(event: object) => void`<br>*event:* The event source of the callback. You can pull out the new value by accessing `event.target.value` (string). |
| <span class="prop-name">placeholder</span> | <span class="prop-type">string</span> | | The short hint displayed in the input before the user enters a value. |
| <span class="prop-name">placeholder</span> | <span class="prop-type">string</span> | | The short hint displayed in the `input` before the user enters a value. |
| <span class="prop-name">readOnly</span> | <span class="prop-type">bool</span> | | It prevents the user from changing the value of the field (not from interacting with the field). |
| <span class="prop-name">required</span> | <span class="prop-type">bool</span> | | If `true`, the `input` element is required. The prop defaults to the value (`false`) inherited from the parent FormControl component. |
| <span class="prop-name">rows</span> | <span class="prop-type">number<br>&#124;&nbsp;string</span> | | Number of rows to display when multiline option is set to true. |
Expand Down