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] Standardize some API descriptions #24274

Merged
merged 17 commits into from
Jan 6, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ function FormButton(props) {

FormButton.propTypes = {
/**
* If `true`, the button is disabled.
* If `true`, the base button is disabled.
* If `true`, the component is disabled.
* If `true`, the component is disabled.
*/
disabled: PropTypes.bool,
mounted: PropTypes.bool,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"componentDescription": "",
"propDescriptions": {
"children": "The content of the accordion details.",
"children": "The content of the component.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details."
},
"classDescriptions": { "root": { "description": "Styles applied to the root element." } }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"componentDescription": "",
"propDescriptions": {
"children": "The content of the accordion summary.",
"children": "The content of the component.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"expandIcon": "The icon to display as the expand indicator.",
"focusVisibleClassName": "This prop can help identify which element has keyboard focus. The class name will be applied when the element gains the focus through keyboard interaction. It&#39;s a polyfill for the <a href=\"https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo\">CSS :focus-visible selector</a>. The rationale for using this feature <a href=\"https://github.com/WICG/focus-visible/blob/master/explainer.md\">is explained here</a>. A <a href=\"https://github.com/WICG/focus-visible\">polyfill can be used</a> to apply a <code>focus-visible</code> class to other components if needed."
Expand Down
4 changes: 2 additions & 2 deletions docs/translations/api-docs/accordion/accordion.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"componentDescription": "",
"propDescriptions": {
"children": "The content of the accordion.",
"children": "The content of the component.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"defaultExpanded": "If <code>true</code>, expands the accordion by default.",
"disabled": "If <code>true</code>, the accordion is displayed in a disabled state.",
"disabled": "If <code>true</code>, the component is disabled.",
"expanded": "If <code>true</code>, expands the accordion, otherwise collapse it. Setting this prop enables control over the accordion.",
"onChange": "Callback fired when the expand/collapse state is changed.<br><br><strong>Signature:</strong><br><code>function(event: object, expanded: boolean) =&gt; void</code><br><em>event:</em> The event source of the callback. <strong>Warning</strong>: This is a generic event not a change event.<br><em>expanded:</em> The <code>expanded</code> state of the accordion.",
"square": "If <code>true</code>, rounded corners are disabled.",
Expand Down
10 changes: 5 additions & 5 deletions docs/translations/api-docs/autocomplete/autocomplete.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
"clearOnEscape": "If <code>true</code>, clear all values when the user presses escape and the popup is closed.",
"clearText": "Override the default text for the <em>clear</em> icon button.<br>For localization purposes, you can use the provided <a href=\"/guides/localization/\">translations</a>.",
"closeText": "Override the default text for the <em>close popup</em> icon button.<br>For localization purposes, you can use the provided <a href=\"/guides/localization/\">translations</a>.",
"defaultValue": "The default input value. Use when the component is not controlled.",
"defaultValue": "The default value. Use when the component is not controlled.",
"disableClearable": "If <code>true</code>, the input can&#39;t be cleared.",
"disableCloseOnSelect": "If <code>true</code>, the popup won&#39;t close when a value is selected.",
"disabled": "If <code>true</code>, the input is disabled.",
"disabled": "If <code>true</code>, the component is disabled.",
"disabledItemsFocusable": "If <code>true</code>, will allow focus on disabled items.",
"disableListWrap": "If <code>true</code>, the list box in the popup will not wrap focus.",
"disablePortal": "The <code>Popper</code> content will be inside the DOM hierarchy of the parent component.",
"disablePortal": "The <code>Popper</code> content will be under the DOM hierarchy of the parent component.",
"filterOptions": "A filter function that determines the options that are eligible.<br><br><strong>Signature:</strong><br><code>function(options: T[], state: object) =&gt; T[]</code><br><em>options:</em> The options to render.<br><em>state:</em> The state of the component.",
"filterSelectedOptions": "If <code>true</code>, hide the selected options from the list box.",
"forcePopupIcon": "Force the visibility display of the popup icon.",
Expand All @@ -45,7 +45,7 @@
"onHighlightChange": "Callback fired when the highlight option changes.<br><br><strong>Signature:</strong><br><code>function(event: object, option: T, reason: string) =&gt; void</code><br><em>event:</em> The event source of the callback.<br><em>option:</em> The highlighted option.<br><em>reason:</em> Can be: <code>&quot;keyboard&quot;</code>, <code>&quot;auto&quot;</code>, <code>&quot;mouse&quot;</code>.",
"onInputChange": "Callback fired when the input value changes.<br><br><strong>Signature:</strong><br><code>function(event: object, value: string, reason: string) =&gt; void</code><br><em>event:</em> The event source of the callback.<br><em>value:</em> The new value of the text input.<br><em>reason:</em> Can be: <code>&quot;input&quot;</code> (user input), <code>&quot;reset&quot;</code> (programmatic change), <code>&quot;clear&quot;</code>.",
"onOpen": "Callback fired when the popup requests to be opened. Use in controlled mode (see open).<br><br><strong>Signature:</strong><br><code>function(event: object) =&gt; void</code><br><em>event:</em> The event source of the callback.",
"open": "Control the popup` open state.",
"open": "If <code>true</code>, the component is shown.",
"openOnFocus": "If <code>true</code>, the popup will open on input focus.",
"openText": "Override the default text for the <em>open popup</em> icon button.<br>For localization purposes, you can use the provided <a href=\"/guides/localization/\">translations</a>.",
"options": "Array of options.",
Expand All @@ -57,7 +57,7 @@
"renderOption": "Render the option, use <code>getOptionLabel</code> by default.<br><br><strong>Signature:</strong><br><code>function(props: object, option: T, state: object) =&gt; ReactNode</code><br><em>props:</em> The props to apply on the li element.<br><em>option:</em> The option to render.<br><em>state:</em> The state of the component.",
"renderTags": "Render the selected value.<br><br><strong>Signature:</strong><br><code>function(value: T[], getTagProps: function) =&gt; ReactNode</code><br><em>value:</em> The <code>value</code> provided to the component.<br><em>getTagProps:</em> A tag props getter.",
"selectOnFocus": "If <code>true</code>, the input&#39;s text is selected on focus. It helps the user clear the selected value.",
"size": "The size of the autocomplete.",
"size": "The size of the component.",
"value": "The value of the autocomplete.<br>The value must have reference equality with the option in order to be selected. You can customize the equality behavior with the <code>getOptionSelected</code> prop."
},
"classDescriptions": {
Expand Down
2 changes: 1 addition & 1 deletion docs/translations/api-docs/avatar-group/avatar-group.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"max": "Max avatars to show before +x.",
"spacing": "Spacing between avatars.",
"variant": "The shape of the avatars."
"variant": "The variant to use."
},
"classDescriptions": {
"root": { "description": "Styles applied to the root element." },
Expand Down
2 changes: 1 addition & 1 deletion docs/translations/api-docs/avatar/avatar.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"children": "Used to render icon or text elements inside the Avatar if <code>src</code> is not set. This can be an element, or just a string.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"imgProps": "Attributes applied to the <code>img</code> element if the component is used to display an image. It can be used to listen for the loading error event.",
"imgProps": "&lt;a href=&quot;<a href=\"https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes&quot;&gt;Attributes&lt;/a&gt;\">https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes&quot;&gt;Attributes&lt;/a&gt;</a> applied to the <code>img</code> element if the component is used to display an image. It can be used to listen for the loading error event.",
"sizes": "The <code>sizes</code> attribute for the <code>img</code> element.",
"src": "The <code>src</code> attribute for the <code>img</code> element.",
"srcSet": "The <code>srcSet</code> attribute for the <code>img</code> element. Use this attribute for responsive image display.",
Expand Down
2 changes: 1 addition & 1 deletion docs/translations/api-docs/backdrop/backdrop.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"children": "The content of the component.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"invisible": "If <code>true</code>, the backdrop is invisible. It can be used when rendering a popover or a custom select component.",
"open": "If <code>true</code>, the backdrop is open.",
"open": "If <code>true</code>, the component is shown.",
"transitionDuration": "The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object."
},
"classDescriptions": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"propDescriptions": {
"children": "This prop isn&#39;t supported. Use the <code>component</code> prop if you need to change the children structure.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"icon": "The icon element.",
"icon": "The icon to display.",
"label": "The label element.",
"showLabel": "If <code>true</code>, the <code>BottomNavigationAction</code> will show its label. By default, only the selected <code>BottomNavigationAction</code> inside <code>BottomNavigation</code> will show its label.<br>The prop defaults to the value (<code>false</code>) inherited from the parent BottomNavigation component.",
"value": "You can provide your own value. Otherwise, we fallback to the child position index."
Expand Down
2 changes: 1 addition & 1 deletion docs/translations/api-docs/breadcrumbs/breadcrumbs.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"componentDescription": "",
"propDescriptions": {
"children": "The breadcrumb children.",
"children": "The content of the component.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"expandText": "Override the default label for the expand button.<br>For localization purposes, you can use the provided <a href=\"/guides/localization/\">translations</a>.",
Expand Down
4 changes: 2 additions & 2 deletions docs/translations/api-docs/button-base/button-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"children": "The content of the component.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.<br>⚠️ <a href=\"/guides/composition/#caveat-with-refs\">Needs to be able to hold a ref</a>.",
"disabled": "If <code>true</code>, the base button is disabled.",
"disableRipple": "If <code>true</code>, the ripple effect is disabled.<br>⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure to highlight the element by applying separate styles with the <code>focusVisibleClassName</code>.",
"disabled": "If <code>true</code>, the component is disabled.",
"disableRipple": "If <code>true</code>, the ripple effect is disabled.<br>⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure to highlight the element by applying separate styles with the <code>.Mui-focusedVisible</code> class.",
"disableTouchRipple": "If <code>true</code>, the touch ripple effect is disabled.",
"focusRipple": "If <code>true</code>, the base button will have a keyboard focus ripple.",
"focusVisibleClassName": "This prop can help identify which element has keyboard focus. The class name will be applied when the element gains the focus through keyboard interaction. It&#39;s a polyfill for the <a href=\"https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo\">CSS :focus-visible selector</a>. The rationale for using this feature <a href=\"https://github.com/WICG/focus-visible/blob/master/explainer.md\">is explained here</a>. A <a href=\"https://github.com/WICG/focus-visible\">polyfill can be used</a> to apply a <code>focus-visible</code> class to other components if needed.",
Expand Down
8 changes: 4 additions & 4 deletions docs/translations/api-docs/button-group/button-group.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"componentDescription": "",
"propDescriptions": {
"children": "The content of the button group.",
"children": "The content of the component.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"color": "The color of the component. It supports those theme colors that make sense for this component.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"disabled": "If <code>true</code>, the buttons are disabled.",
"disabled": "If <code>true</code>, the component is disabled.",
"disableElevation": "If <code>true</code>, no elevation is used.",
"disableFocusRipple": "If <code>true</code>, the button keyboard focus ripple is disabled.",
"disableRipple": "If <code>true</code>, the button ripple effect is disabled.",
"fullWidth": "If <code>true</code>, the buttons will take up the full width of its container.",
"orientation": "The group orientation (layout flow direction).",
"size": "The size of the button. <code>small</code> is equivalent to the dense button styling.",
"orientation": "The component orientation (layout flow direction).",
"size": "The size of the component. <code>small</code> is equivalent to the dense button styling.",
"variant": "The variant to use."
},
"classDescriptions": {
Expand Down
8 changes: 4 additions & 4 deletions docs/translations/api-docs/button/button.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"componentDescription": "",
"propDescriptions": {
"children": "The content of the button.",
"children": "The content of the component.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"color": "The color of the component. It supports those theme colors that make sense for this component.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"disabled": "If <code>true</code>, the button is disabled.",
"disabled": "If <code>true</code>, the component is disabled.",
"disableElevation": "If <code>true</code>, no elevation is used.",
"disableFocusRipple": "If <code>true</code>, the keyboard focus ripple is disabled.",
"disableRipple": "If <code>true</code>, the ripple effect is disabled.<br>⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure to highlight the element by applying separate styles with the <code>focusVisibleClassName</code>.",
"disableRipple": "If <code>true</code>, the ripple effect is disabled.<br>⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure to highlight the element by applying separate styles with the <code>.Mui-focusedVisible</code> class.",
"endIcon": "Element placed after the children.",
"fullWidth": "If <code>true</code>, the button will take up the full width of its container.",
"href": "The URL to link to when the button is clicked. If defined, an <code>a</code> element will be used as the root node.",
"size": "The size of the button. <code>small</code> is equivalent to the dense button styling.",
"size": "The size of the component. <code>small</code> is equivalent to the dense button styling.",
"startIcon": "Element placed before the children.",
"sx": "The system prop that allows defining system overrides as well as additional CSS styles. See the <a href=\"/system/basics/#the-sx-prop\">`sx` page</a> for more details.",
"variant": "The variant to use."
Expand Down
4 changes: 2 additions & 2 deletions docs/translations/api-docs/card-header/card-header.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"componentDescription": "",
"propDescriptions": {
"action": "The action to display in the card header.",
"avatar": "The Avatar for the Card Header.",
"avatar": "The Avatar element to display.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"component": "The component used for the root node. Either a string to use a HTML element or a component.",
"disableTypography": "If <code>true</code>, <code>subheader</code> and <code>title</code> won&#39;t be wrapped by a Typography component. This can be useful to render an alternative Typography variant by wrapping the <code>title</code> text, and optional <code>subheader</code> text with the Typography component.",
"subheader": "The content of the component.",
"subheaderTypographyProps": "These props will be forwarded to the subheader (as long as disableTypography is not <code>true</code>).",
"title": "The content of the Card Title.",
"title": "The content of the component.",
"titleTypographyProps": "These props will be forwarded to the title (as long as disableTypography is not <code>true</code>)."
},
"classDescriptions": {
Expand Down
4 changes: 2 additions & 2 deletions docs/translations/api-docs/checkbox/checkbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"checkedIcon": "The icon to display when the component is checked.",
"classes": "Override or extend the styles applied to the component. See <a href=\"#css\">CSS API</a> below for more details.",
"color": "The color of the component. It supports those theme colors that make sense for this component.",
"disabled": "If <code>true</code>, the checkbox is disabled.",
"disabled": "If <code>true</code>, the component is disabled.",
"disableRipple": "If <code>true</code>, the ripple effect is disabled.",
"icon": "The icon to display when the component is unchecked.",
"id": "The id of the <code>input</code> element.",
Expand All @@ -15,7 +15,7 @@
"inputRef": "Pass a ref to the <code>input</code> element.",
"onChange": "Callback fired when the state is changed.<br><br><strong>Signature:</strong><br><code>function(event: object) =&gt; void</code><br><em>event:</em> The event source of the callback. You can pull out the new checked state by accessing <code>event.target.checked</code> (boolean).",
"required": "If <code>true</code>, the <code>input</code> element is required.",
"size": "The size of the checkbox. <code>small</code> is equivalent to the dense checkbox styling.",
"size": "The size of the component. <code>small</code> is equivalent to the dense checkbox styling.",
"value": "The value of the component. The DOM API casts this to a string. The browser uses &quot;on&quot; as the default value."
},
"classDescriptions": {
Expand Down