From a308f6c5f8f170421a04deeea4cd849fade7e7c9 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Tue, 9 Jun 2020 23:52:10 +0200 Subject: [PATCH] [docs] Improve legibility of required star (#21369) --- docs/pages/api-docs/autocomplete.md | 4 ++-- docs/pages/api-docs/backdrop.md | 2 +- docs/pages/api-docs/click-away-listener.md | 4 ++-- docs/pages/api-docs/dialog.md | 2 +- docs/pages/api-docs/expansion-panel.md | 2 +- docs/pages/api-docs/fab.md | 2 +- docs/pages/api-docs/form-control-label.md | 2 +- docs/pages/api-docs/grid-list.md | 2 +- docs/pages/api-docs/input-adornment.md | 2 +- docs/pages/api-docs/link.md | 2 +- docs/pages/api-docs/list-item-avatar.md | 2 +- docs/pages/api-docs/menu.md | 2 +- docs/pages/api-docs/mobile-stepper.md | 2 +- docs/pages/api-docs/modal.md | 4 ++-- docs/pages/api-docs/popover.md | 2 +- docs/pages/api-docs/popper.md | 4 ++-- docs/pages/api-docs/root-ref.md | 4 ++-- docs/pages/api-docs/speed-dial.md | 4 ++-- docs/pages/api-docs/swipeable-drawer.md | 6 +++--- docs/pages/api-docs/tab-context.md | 2 +- docs/pages/api-docs/tab-panel.md | 2 +- docs/pages/api-docs/tab-scroll-button.md | 4 ++-- docs/pages/api-docs/table-pagination.md | 8 ++++---- docs/pages/api-docs/table.md | 2 +- docs/pages/api-docs/toggle-button.md | 4 ++-- docs/pages/api-docs/tooltip.md | 4 ++-- docs/pages/api-docs/tree-item.md | 2 +- docs/pages/api-docs/unstable-trap-focus.md | 6 +++--- docs/src/modules/utils/generateMarkdown.js | 2 +- 29 files changed, 45 insertions(+), 45 deletions(-) diff --git a/docs/pages/api-docs/autocomplete.md b/docs/pages/api-docs/autocomplete.md index 24e44103c3a91d..71e4a0de48410d 100644 --- a/docs/pages/api-docs/autocomplete.md +++ b/docs/pages/api-docs/autocomplete.md @@ -76,12 +76,12 @@ The `MuiAutocomplete` name can be used for providing [default props](/customizat | open | bool | | Control the popup` open state. | | openOnFocus | bool | false | If `true`, the popup will open on input focus. | | openText | string | 'Open' | Override the default text for the *open popup* icon button.
For localization purposes, you can use the provided [translations](/guides/localization/). | -| options * | array | | Array of options. | +| options* | array | | Array of options. | | PaperComponent | elementType | Paper | The component used to render the body of the popup. | | PopperComponent | elementType | Popper | The component used to position the popup. | | popupIcon | node | <ArrowDropDownIcon /> | The icon to display in place of the default popup icon. | | renderGroup | func | | Render the group.

**Signature:**
`function(option: any) => ReactNode`
*option:* The group to render. | -| renderInput * | func | | Render the input.

**Signature:**
`function(params: object) => ReactNode`
| +| renderInput* | func | | Render the input.

**Signature:**
`function(params: object) => ReactNode`
| | renderOption | func | | Render the option, use `getOptionLabel` by default.

**Signature:**
`function(option: T, state: object) => ReactNode`
*option:* The option to render.
*state:* The state of the component. | | renderTags | func | | Render the selected value.

**Signature:**
`function(value: T[], getTagProps: function) => ReactNode`
*value:* The `value` provided to the component.
*getTagProps:* A tag props getter. | | selectOnFocus | bool | !props.freeSolo | If `true`, the input's text will be selected on focus. It helps the user clear the selected value. | diff --git a/docs/pages/api-docs/backdrop.md b/docs/pages/api-docs/backdrop.md index 2d655c10079a7c..d295e15fabbf38 100644 --- a/docs/pages/api-docs/backdrop.md +++ b/docs/pages/api-docs/backdrop.md @@ -31,7 +31,7 @@ The `MuiBackdrop` name can be used for providing [default props](/customization/ | children | node | | The content of the component. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | invisible | bool | false | If `true`, the backdrop is invisible. It can be used when rendering a popover or a custom select component. | -| open * | bool | | If `true`, the backdrop is open. | +| open* | bool | | If `true`, the backdrop is open. | | transitionDuration | number
| { appear?: number, enter?: number, exit?: number }
| | The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object. | The `ref` is forwarded to the root element. diff --git a/docs/pages/api-docs/click-away-listener.md b/docs/pages/api-docs/click-away-listener.md index 3711a7e33f223c..ecba2f2884ce37 100644 --- a/docs/pages/api-docs/click-away-listener.md +++ b/docs/pages/api-docs/click-away-listener.md @@ -27,10 +27,10 @@ For instance, if you need to hide a menu when people click anywhere else on your | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| -| children * | element | | The wrapped element.
⚠️ [Needs to be able to hold a ref](/guides/composition/#caveat-with-refs). | +| children* | element | | The wrapped element.
⚠️ [Needs to be able to hold a ref](/guides/composition/#caveat-with-refs). | | disableReactTree | bool | false | If `true`, the React tree is ignored and only the DOM tree is considered. This prop changes how portaled elements are handled. | | mouseEvent | 'onClick'
| 'onMouseDown'
| 'onMouseUp'
| false
| 'onClick' | The mouse event to listen to. You can disable the listener by providing `false`. | -| onClickAway * | func | | Callback fired when a "click away" event is detected. | +| onClickAway* | func | | Callback fired when a "click away" event is detected. | | touchEvent | 'onTouchEnd'
| 'onTouchStart'
| false
| 'onTouchEnd' | The touch event to listen to. You can disable the listener by providing `false`. | The component cannot hold a ref. diff --git a/docs/pages/api-docs/dialog.md b/docs/pages/api-docs/dialog.md index 11da3d5b29c966..0ffc7466cf7641 100644 --- a/docs/pages/api-docs/dialog.md +++ b/docs/pages/api-docs/dialog.md @@ -46,7 +46,7 @@ The `MuiDialog` name can be used for providing [default props](/customization/gl | onExit | func | | Callback fired before the dialog exits. | | onExited | func | | Callback fired when the dialog has exited. | | onExiting | func | | Callback fired when the dialog is exiting. | -| open * | bool | | If `true`, the Dialog is open. | +| open* | bool | | If `true`, the Dialog is open. | | PaperComponent | elementType | Paper | The component used to render the body of the dialog. | | PaperProps | object | {} | Props applied to the [`Paper`](/api/paper/) element. | | scroll | 'body'
| 'paper'
| 'paper' | Determine the container for scrolling the dialog. | diff --git a/docs/pages/api-docs/expansion-panel.md b/docs/pages/api-docs/expansion-panel.md index 25ab8209794329..5d92270d9b0953 100644 --- a/docs/pages/api-docs/expansion-panel.md +++ b/docs/pages/api-docs/expansion-panel.md @@ -28,7 +28,7 @@ The `MuiExpansionPanel` name can be used for providing [default props](/customiz | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| -| children * | node | | The content of the expansion panel. | +| children* | node | | The content of the expansion panel. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | defaultExpanded | bool | false | If `true`, expands the panel by default. | | disabled | bool | false | If `true`, the panel will be displayed in a disabled state. | diff --git a/docs/pages/api-docs/fab.md b/docs/pages/api-docs/fab.md index a45489c1c4d032..ba506ce8f276e0 100644 --- a/docs/pages/api-docs/fab.md +++ b/docs/pages/api-docs/fab.md @@ -28,7 +28,7 @@ The `MuiFab` name can be used for providing [default props](/customization/globa | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| -| children * | node | | The content of the button. | +| children* | node | | The content of the button. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | color | 'default'
| 'inherit'
| 'primary'
| 'secondary'
| 'default' | The color of the component. It supports those theme colors that make sense for this component. | | component | elementType | 'button' | The component used for the root node. Either a string to use a HTML element or a component. | diff --git a/docs/pages/api-docs/form-control-label.md b/docs/pages/api-docs/form-control-label.md index 236bad97c926f1..6eefaf1c0de965 100644 --- a/docs/pages/api-docs/form-control-label.md +++ b/docs/pages/api-docs/form-control-label.md @@ -31,7 +31,7 @@ The `MuiFormControlLabel` name can be used for providing [default props](/custom |:-----|:-----|:--------|:------------| | checked | bool | | If `true`, the component appears selected. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | -| control * | element | | A control element. For instance, it can be be a `Radio`, a `Switch` or a `Checkbox`. | +| control* | element | | A control element. For instance, it can be be a `Radio`, a `Switch` or a `Checkbox`. | | disabled | bool | | If `true`, the control will be disabled. | | inputRef | ref | | Pass a ref to the `input` element. | | label | node | | The text to be used in an enclosing label element. | diff --git a/docs/pages/api-docs/grid-list.md b/docs/pages/api-docs/grid-list.md index ae8ebbc353e821..89d7014be4af46 100644 --- a/docs/pages/api-docs/grid-list.md +++ b/docs/pages/api-docs/grid-list.md @@ -29,7 +29,7 @@ The `MuiGridList` name can be used for providing [default props](/customization/ | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| | cellHeight | number
| 'auto'
| 180 | Number of px for one cell height. You can set `'auto'` if you want to let the children determine the height. | -| children * | node | | Grid Tiles that will be in Grid List. | +| children* | node | | Grid Tiles that will be in Grid List. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | cols | number | 2 | Number of columns. | | component | elementType | 'ul' | The component used for the root node. Either a string to use a HTML element or a component. | diff --git a/docs/pages/api-docs/input-adornment.md b/docs/pages/api-docs/input-adornment.md index 625b451e758ea3..b21aa80a921162 100644 --- a/docs/pages/api-docs/input-adornment.md +++ b/docs/pages/api-docs/input-adornment.md @@ -28,7 +28,7 @@ The `MuiInputAdornment` name can be used for providing [default props](/customiz | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| -| children * | node | | The content of the component, normally an `IconButton` or string. | +| children* | node | | The content of the component, normally an `IconButton` or string. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | component | elementType | 'div' | The component used for the root node. Either a string to use a HTML element or a component. | | disablePointerEvents | bool | false | Disable pointer events on the root. This allows for the content of the adornment to focus the input on click. | diff --git a/docs/pages/api-docs/link.md b/docs/pages/api-docs/link.md index 0e2834dcbd2236..d67224f6ceeb2b 100644 --- a/docs/pages/api-docs/link.md +++ b/docs/pages/api-docs/link.md @@ -28,7 +28,7 @@ The `MuiLink` name can be used for providing [default props](/customization/glob | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| -| children * | node | | The content of the link. | +| children* | node | | The content of the link. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | color | 'initial'
| 'inherit'
| 'primary'
| 'secondary'
| 'textPrimary'
| 'textSecondary'
| 'error'
| 'primary' | The color of the link. | | component | element type | 'a' | The component used for the root node. Either a string to use a HTML element or a component.
⚠️ [Needs to be able to hold a ref](/guides/composition/#caveat-with-refs). | diff --git a/docs/pages/api-docs/list-item-avatar.md b/docs/pages/api-docs/list-item-avatar.md index e5aa82d546cef1..db45990934e373 100644 --- a/docs/pages/api-docs/list-item-avatar.md +++ b/docs/pages/api-docs/list-item-avatar.md @@ -28,7 +28,7 @@ The `MuiListItemAvatar` name can be used for providing [default props](/customiz | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| -| children * | element | | The content of the component – normally `Avatar`. | +| children* | element | | The content of the component – normally `Avatar`. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | The `ref` is forwarded to the root element. diff --git a/docs/pages/api-docs/menu.md b/docs/pages/api-docs/menu.md index eed4fde79c5cd2..7e1771023275fe 100644 --- a/docs/pages/api-docs/menu.md +++ b/docs/pages/api-docs/menu.md @@ -41,7 +41,7 @@ The `MuiMenu` name can be used for providing [default props](/customization/glob | onExit | func | | Callback fired before the Menu exits. | | onExited | func | | Callback fired when the Menu has exited. | | onExiting | func | | Callback fired when the Menu is exiting. | -| open * | bool | | If `true`, the menu is visible. | +| open* | bool | | If `true`, the menu is visible. | | PopoverClasses | object | | `classes` prop applied to the [`Popover`](/api/popover/) element. | | transitionDuration | 'auto'
| number
| { appear?: number, enter?: number, exit?: number }
| 'auto' | The length of the transition in `ms`, or 'auto' | | variant | 'menu'
| 'selectedMenu'
| 'selectedMenu' | The variant to use. Use `menu` to prevent selected items from impacting the initial focus and the vertical alignment relative to the anchor element. | diff --git a/docs/pages/api-docs/mobile-stepper.md b/docs/pages/api-docs/mobile-stepper.md index e22b8af85b67a8..d7bad9efecd526 100644 --- a/docs/pages/api-docs/mobile-stepper.md +++ b/docs/pages/api-docs/mobile-stepper.md @@ -34,7 +34,7 @@ The `MuiMobileStepper` name can be used for providing [default props](/customiza | LinearProgressProps | object | | Props applied to the `LinearProgress` element. | | nextButton | node | | A next button element. For instance, it can be a `Button` or an `IconButton`. | | position | 'bottom'
| 'static'
| 'top'
| 'bottom' | Set the positioning type. | -| steps * | number | | The total steps. | +| steps* | number | | The total steps. | | variant | 'dots'
| 'progress'
| 'text'
| 'dots' | The variant to use. | The `ref` is forwarded to the root element. diff --git a/docs/pages/api-docs/modal.md b/docs/pages/api-docs/modal.md index 1bbd64b016da1d..aef58d703ac875 100644 --- a/docs/pages/api-docs/modal.md +++ b/docs/pages/api-docs/modal.md @@ -38,7 +38,7 @@ This component shares many concepts with [react-overlays](https://react-bootstra |:-----|:-----|:--------|:------------| | BackdropComponent | elementType | SimpleBackdrop | A backdrop component. This prop enables custom backdrop rendering. | | BackdropProps | object | | Props applied to the [`Backdrop`](/api/backdrop/) element. | -| children * | element | | A single child content element.
⚠️ [Needs to be able to hold a ref](/guides/composition/#caveat-with-refs). | +| children* | element | | A single child content element.
⚠️ [Needs to be able to hold a ref](/guides/composition/#caveat-with-refs). | | closeAfterTransition | bool | false | When set to true the Modal waits until a nested Transition is completed before closing. | | container | HTML element
| React.Component
| func
| | A HTML element, component instance, or function that returns either. The `container` will have the portal children appended to it.
By default, it uses the body of the top-level document object, so it's simply `document.body` most of the time. | | disableAutoFocus | bool | false | If `true`, the modal will not automatically shift focus to itself when it opens, and replace it to the last focused element when it closes. This also works correctly with any modal children that have the `disableAutoFocus` prop.
Generally this should never be set to `true` as it makes the modal less accessible to assistive technologies, like screen readers. | @@ -54,7 +54,7 @@ This component shares many concepts with [react-overlays](https://react-bootstra | onClose | func | | Callback fired when the component requests to be closed. The `reason` parameter can optionally be used to control the response to `onClose`.

**Signature:**
`function(event: object, reason: string) => void`
*event:* The event source of the callback.
*reason:* Can be: `"escapeKeyDown"`, `"backdropClick"`. | | onEscapeKeyDown | func | | Callback fired when the escape key is pressed, `disableEscapeKeyDown` is false and the modal is in focus. | | onRendered | func | | Callback fired once the children has been mounted into the `container`. It signals that the `open={true}` prop took effect.
This prop will be deprecated and removed in v5, the ref can be used instead. | -| open * | bool | | If `true`, the modal is open. | +| open* | bool | | If `true`, the modal is open. | The `ref` is forwarded to the root element. diff --git a/docs/pages/api-docs/popover.md b/docs/pages/api-docs/popover.md index b8270375af51be..89cc1c7f137400 100644 --- a/docs/pages/api-docs/popover.md +++ b/docs/pages/api-docs/popover.md @@ -46,7 +46,7 @@ The `MuiPopover` name can be used for providing [default props](/customization/g | onExit | func | | Callback fired before the component is exiting. | | onExited | func | | Callback fired when the component has exited. | | onExiting | func | | Callback fired when the component is exiting. | -| open * | bool | | If `true`, the popover is visible. | +| open* | bool | | If `true`, the popover is visible. | | PaperProps | { component?: element type } | {} | Props applied to the [`Paper`](/api/paper/) element. | | transformOrigin | { horizontal: 'center'
| 'left'
| 'right'
| number, vertical: 'bottom'
| 'center'
| 'top'
| number }
| { vertical: 'top', horizontal: 'left',} | This is the point on the popover which will attach to the anchor's origin.
Options: vertical: [top, center, bottom, x(px)]; horizontal: [left, center, right, x(px)]. | | TransitionComponent | elementType | Grow | The component used for the transition. [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | diff --git a/docs/pages/api-docs/popper.md b/docs/pages/api-docs/popper.md index 72b841b34676dd..7c5d2419f07e3e 100644 --- a/docs/pages/api-docs/popper.md +++ b/docs/pages/api-docs/popper.md @@ -27,12 +27,12 @@ Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v1/ | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| | anchorEl | HTML element
| object
| func
| | A HTML element, [referenceObject](https://popper.js.org/docs/v1/#referenceObject), or a function that returns either. It's used to set the position of the popper. The return value will passed as the reference object of the Popper instance. | -| children * | node
| func
| | Popper render function or node. | +| children* | node
| func
| | Popper render function or node. | | container | HTML element
| React.Component
| func
| | A HTML element, component instance, or function that returns either. The `container` will have the portal children appended to it.
By default, it uses the body of the top-level document object, so it's simply `document.body` most of the time. | | disablePortal | bool | false | Disable the portal behavior. The children stay within it's parent DOM hierarchy. | | keepMounted | bool | false | Always keep the children in the DOM. This prop can be useful in SEO situation or when you want to maximize the responsiveness of the Popper. | | modifiers | object | | Popper.js is based on a "plugin-like" architecture, most of its features are fully encapsulated "modifiers".
A modifier is a function that is called each time Popper.js needs to compute the position of the popper. For this reason, modifiers should be very performant to avoid bottlenecks. To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v1/#modifiers). | -| open * | bool | | If `true`, the popper is visible. | +| open* | bool | | If `true`, the popper is visible. | | placement | 'bottom-end'
| 'bottom-start'
| 'bottom'
| 'left-end'
| 'left-start'
| 'left'
| 'right-end'
| 'right-start'
| 'right'
| 'top-end'
| 'top-start'
| 'top'
| 'bottom' | Popper placement. | | popperOptions | object | {} | Options provided to the [`popper.js`](https://popper.js.org/docs/v1/) instance. | | popperRef | ref | | A ref that points to the used popper instance. | diff --git a/docs/pages/api-docs/root-ref.md b/docs/pages/api-docs/root-ref.md index c114c9e5993702..bbb3aea0e03bc4 100644 --- a/docs/pages/api-docs/root-ref.md +++ b/docs/pages/api-docs/root-ref.md @@ -55,8 +55,8 @@ function MyComponent() { | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| -| children * | element | | The wrapped element. | -| rootRef * | refType.isRequired | | A ref that points to the first DOM node of the wrapped element. | +| children* | element | | The wrapped element. | +| rootRef* | refType.isRequired | | A ref that points to the first DOM node of the wrapped element. | The component cannot hold a ref. diff --git a/docs/pages/api-docs/speed-dial.md b/docs/pages/api-docs/speed-dial.md index 33c9778407416e..f15da610d8566b 100644 --- a/docs/pages/api-docs/speed-dial.md +++ b/docs/pages/api-docs/speed-dial.md @@ -28,7 +28,7 @@ The `MuiSpeedDial` name can be used for providing [default props](/customization | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| -| ariaLabel * | string | | The aria-label of the button element. Also used to provide the `id` for the `SpeedDial` element and its children. | +| ariaLabel* | string | | The aria-label of the button element. Also used to provide the `id` for the `SpeedDial` element and its children. | | children | node | | SpeedDialActions to display when the SpeedDial is `open`. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | direction | 'down'
| 'left'
| 'right'
| 'up'
| 'up' | The direction the actions open relative to the floating action button. | @@ -37,7 +37,7 @@ The `MuiSpeedDial` name can be used for providing [default props](/customization | icon | node | | The icon to display in the SpeedDial Fab. The `SpeedDialIcon` component provides a default Icon with animation. | | onClose | func | | Callback fired when the component requests to be closed.

**Signature:**
`function(event: object, reason: string) => void`
*event:* The event source of the callback.
*reason:* Can be: `"toggle"`, `"blur"`, `"mouseLeave"`, `"escapeKeyDown"`. | | onOpen | func | | Callback fired when the component requests to be open.

**Signature:**
`function(event: object, reason: string) => void`
*event:* The event source of the callback.
*reason:* Can be: `"toggle"`, `"focus"`, `"mouseEnter"`. | -| open * | bool | | If `true`, the SpeedDial is open. | +| open* | bool | | If `true`, the SpeedDial is open. | | openIcon | node | | The icon to display in the SpeedDial Fab when the SpeedDial is open. | | TransitionComponent | elementType | Zoom | The component used for the transition. [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | | transitionDuration | number
| { appear?: number, enter?: number, exit?: number }
| { enter: duration.enteringScreen, exit: duration.leavingScreen,} | The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object. | diff --git a/docs/pages/api-docs/swipeable-drawer.md b/docs/pages/api-docs/swipeable-drawer.md index 3bc2f8ae843853..638fe98126137e 100644 --- a/docs/pages/api-docs/swipeable-drawer.md +++ b/docs/pages/api-docs/swipeable-drawer.md @@ -32,9 +32,9 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | disableSwipeToOpen | bool | typeof navigator !== 'undefined' && /iPad\|iPhone\|iPod/.test(navigator.userAgent) | If `true`, swipe to open is disabled. This is useful in browsers where swiping triggers navigation actions. Swipe to open is disabled on iOS browsers by default. | | hysteresis | number | 0.52 | Affects how far the drawer must be opened/closed to change his state. Specified as percent (0-1) of the width of the drawer | | minFlingVelocity | number | 450 | Defines, from which (average) velocity on, the swipe is defined as complete although hysteresis isn't reached. Good threshold is between 250 - 1000 px/s | -| onClose * | func | | Callback fired when the component requests to be closed.

**Signature:**
`function(event: object) => void`
*event:* The event source of the callback. | -| onOpen * | func | | Callback fired when the component requests to be opened.

**Signature:**
`function(event: object) => void`
*event:* The event source of the callback. | -| open * | bool | | If `true`, the drawer is open. | +| onClose* | func | | Callback fired when the component requests to be closed.

**Signature:**
`function(event: object) => void`
*event:* The event source of the callback. | +| onOpen* | func | | Callback fired when the component requests to be opened.

**Signature:**
`function(event: object) => void`
*event:* The event source of the callback. | +| open* | bool | | If `true`, the drawer is open. | | SwipeAreaProps | object | | The element is used to intercept the touch events on the edge. | | swipeAreaWidth | number | 20 | The width of the left most (or right most) area in pixels where the drawer can be swiped open from. | | transitionDuration | number
| { enter?: number, exit?: number }
| { enter: duration.enteringScreen, exit: duration.leavingScreen } | The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object. | diff --git a/docs/pages/api-docs/tab-context.md b/docs/pages/api-docs/tab-context.md index cd3e0bbc2316f5..67f341f055718a 100644 --- a/docs/pages/api-docs/tab-context.md +++ b/docs/pages/api-docs/tab-context.md @@ -27,7 +27,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| | children | node | | The content of the component. | -| value * | string | | The value of the currently selected `Tab`. | +| value* | string | | The value of the currently selected `Tab`. | The component cannot hold a ref. diff --git a/docs/pages/api-docs/tab-panel.md b/docs/pages/api-docs/tab-panel.md index 7ad4126e27a4bf..c33b91529ea1f3 100644 --- a/docs/pages/api-docs/tab-panel.md +++ b/docs/pages/api-docs/tab-panel.md @@ -30,7 +30,7 @@ The `MuiTabPanel` name can be used for providing [default props](/customization/ |:-----|:-----|:--------|:------------| | children | node | | The content of the component. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | -| value * | string | | The `value` of the corresponding `Tab`. Must use the index of the `Tab` when no `value` was passed to `Tab`. | +| value* | string | | The `value` of the corresponding `Tab`. Must use the index of the `Tab` when no `value` was passed to `Tab`. | The `ref` is forwarded to the root element. diff --git a/docs/pages/api-docs/tab-scroll-button.md b/docs/pages/api-docs/tab-scroll-button.md index ec5bc78921a5f9..2eeb83c26b10ee 100644 --- a/docs/pages/api-docs/tab-scroll-button.md +++ b/docs/pages/api-docs/tab-scroll-button.md @@ -30,9 +30,9 @@ The `MuiTabScrollButton` name can be used for providing [default props](/customi |:-----|:-----|:--------|:------------| | children | node | | The content of the component. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | -| direction * | 'left'
| 'right'
| | Which direction should the button indicate? | +| direction* | 'left'
| 'right'
| | Which direction should the button indicate? | | disabled | bool | | If `true`, the element will be disabled. | -| orientation * | 'horizontal'
| 'vertical'
| | The tabs orientation (layout flow direction). | +| orientation* | 'horizontal'
| 'vertical'
| | The tabs orientation (layout flow direction). | The `ref` is forwarded to the root element. diff --git a/docs/pages/api-docs/table-pagination.md b/docs/pages/api-docs/table-pagination.md index 62407832217839..f77e3b26cd9013 100644 --- a/docs/pages/api-docs/table-pagination.md +++ b/docs/pages/api-docs/table-pagination.md @@ -33,15 +33,15 @@ The `MuiTablePagination` name can be used for providing [default props](/customi | backIconButtonText | string | 'Previous page' | Text label for the back arrow icon button.
For localization purposes, you can use the provided [translations](/guides/localization/). | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | component | elementType | TableCell | The component used for the root node. Either a string to use a HTML element or a component. | -| count * | number | | The total number of rows.
To enable server side pagination for an unknown number of items, provide -1. | +| count* | number | | The total number of rows.
To enable server side pagination for an unknown number of items, provide -1. | | labelDisplayedRows | func | ({ from, to, count }) =>`${from}-${to} of ${count !== -1 ? count : `more than ${to}`}` | Customize the displayed rows label. Invoked with a `{ from, to, count, page }` object.
For localization purposes, you can use the provided [translations](/guides/localization/). | | labelRowsPerPage | node | 'Rows per page:' | Customize the rows per page label.
For localization purposes, you can use the provided [translations](/guides/localization/). | | nextIconButtonProps | object | | Props applied to the next arrow [`IconButton`](/api/icon-button/) element. | | nextIconButtonText | string | 'Next page' | Text label for the next arrow icon button.
For localization purposes, you can use the provided [translations](/guides/localization/). | -| onChangePage * | func | | Callback fired when the page is changed.

**Signature:**
`function(event: object, page: number) => void`
*event:* The event source of the callback.
*page:* The page selected. | +| onChangePage* | func | | Callback fired when the page is changed.

**Signature:**
`function(event: object, page: number) => void`
*event:* The event source of the callback.
*page:* The page selected. | | onChangeRowsPerPage | func | | Callback fired when the number of rows per page is changed.

**Signature:**
`function(event: object) => void`
*event:* The event source of the callback. | -| page * | number | | The zero-based index of the current page. | -| rowsPerPage * | number | | The number of rows per page. | +| page* | number | | The zero-based index of the current page. | +| rowsPerPage* | number | | The number of rows per page. | | rowsPerPageOptions | array | [10, 25, 50, 100] | Customizes the options of the rows per page select field. If less than two options are available, no select field will be displayed. | | SelectProps | object | {} | Props applied to the rows per page [`Select`](/api/select/) element. | diff --git a/docs/pages/api-docs/table.md b/docs/pages/api-docs/table.md index 063df23a6d99c7..df11ac992ee4bf 100644 --- a/docs/pages/api-docs/table.md +++ b/docs/pages/api-docs/table.md @@ -28,7 +28,7 @@ The `MuiTable` name can be used for providing [default props](/customization/glo | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| -| children * | node | | The content of the table, normally `TableHead` and `TableBody`. | +| children* | node | | The content of the table, normally `TableHead` and `TableBody`. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | component | elementType | 'table' | The component used for the root node. Either a string to use a HTML element or a component. | | padding | 'default'
| 'checkbox'
| 'none'
| 'default' | Allows TableCells to inherit padding of the Table. | diff --git a/docs/pages/api-docs/toggle-button.md b/docs/pages/api-docs/toggle-button.md index 0f5389b8f1acf6..df427db1d05303 100644 --- a/docs/pages/api-docs/toggle-button.md +++ b/docs/pages/api-docs/toggle-button.md @@ -28,13 +28,13 @@ The `MuiToggleButton` name can be used for providing [default props](/customizat | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| -| children * | node | | The content of the button. | +| children* | node | | The content of the button. | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | disabled | bool | false | If `true`, the button will be disabled. | | disableFocusRipple | bool | false | If `true`, the keyboard focus ripple will be disabled. | | disableRipple | bool | | If `true`, the ripple effect will be disabled. | | selected | bool | | If `true`, the button will be rendered in an active state. | -| value * | any | | The value to associate with the button when selected in a ToggleButtonGroup. | +| value* | any | | The value to associate with the button when selected in a ToggleButtonGroup. | The `ref` is forwarded to the root element. diff --git a/docs/pages/api-docs/tooltip.md b/docs/pages/api-docs/tooltip.md index 486ff6f99d38a7..92d12f111bf2ba 100644 --- a/docs/pages/api-docs/tooltip.md +++ b/docs/pages/api-docs/tooltip.md @@ -29,7 +29,7 @@ The `MuiTooltip` name can be used for providing [default props](/customization/g | Name | Type | Default | Description | |:-----|:-----|:--------|:------------| | arrow | bool | false | If `true`, adds an arrow to the tooltip. | -| children * | element | | Tooltip reference element.
⚠️ [Needs to be able to hold a ref](/guides/composition/#caveat-with-refs). | +| children* | element | | Tooltip reference element.
⚠️ [Needs to be able to hold a ref](/guides/composition/#caveat-with-refs). | | classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. | | disableFocusListener | bool | false | Do not respond to focus events. | | disableHoverListener | bool | false | Do not respond to hover events. | @@ -47,7 +47,7 @@ The `MuiTooltip` name can be used for providing [default props](/customization/g | placement | 'bottom-end'
| 'bottom-start'
| 'bottom'
| 'left-end'
| 'left-start'
| 'left'
| 'right-end'
| 'right-start'
| 'right'
| 'top-end'
| 'top-start'
| 'top'
| 'bottom' | Tooltip placement. | | PopperComponent | elementType | Popper | The component used for the popper. | | PopperProps | object | | Props applied to the [`Popper`](/api/popper/) element. | -| title * | node | | Tooltip title. Zero-length titles string are never displayed. | +| title* | node | | Tooltip title. Zero-length titles string are never displayed. | | TransitionComponent | elementType | Grow | The component used for the transition. [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | | TransitionProps | object | | Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element. | diff --git a/docs/pages/api-docs/tree-item.md b/docs/pages/api-docs/tree-item.md index 122e4aefc92c56..69ac352d35e1d7 100644 --- a/docs/pages/api-docs/tree-item.md +++ b/docs/pages/api-docs/tree-item.md @@ -35,7 +35,7 @@ The `MuiTreeItem` name can be used for providing [default props](/customization/ | expandIcon | node | | The icon used to expand the node. | | icon | node | | The icon to display next to the tree node's label. | | label | node | | The tree node label. | -| nodeId * | string | | The id of the node. | +| nodeId* | string | | The id of the node. | | onIconClick | func | | `onClick` handler for the icon container. Call `event.preventDefault()` to prevent `onNodeToggle` from being called. | | onLabelClick | func | | `onClick` handler for the label container. Call `event.preventDefault()` to prevent `onNodeToggle` from being called. | | TransitionComponent | elementType | Collapse | The component used for the transition. [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component. | diff --git a/docs/pages/api-docs/unstable-trap-focus.md b/docs/pages/api-docs/unstable-trap-focus.md index deda1203a047ef..957c04121695bb 100644 --- a/docs/pages/api-docs/unstable-trap-focus.md +++ b/docs/pages/api-docs/unstable-trap-focus.md @@ -30,9 +30,9 @@ Utility component that locks focus inside the component. | disableAutoFocus | bool | false | If `true`, the trap focus will not automatically shift focus to itself when it opens, and replace it to the last focused element when it closes. This also works correctly with any trap focus children that have the `disableAutoFocus` prop.
Generally this should never be set to `true` as it makes the trap focus less accessible to assistive technologies, like screen readers. | | disableEnforceFocus | bool | false | If `true`, the trap focus will not prevent focus from leaving the trap focus while open.
Generally this should never be set to `true` as it makes the trap focus less accessible to assistive technologies, like screen readers. | | disableRestoreFocus | bool | false | If `true`, the trap focus will not restore focus to previously focused element once trap focus is hidden. | -| getDoc * | func | | Return the document to consider. We use it to implement the restore focus between different browser documents. | -| isEnabled * | func | | Do we still want to enforce the focus? This prop helps nesting TrapFocus elements. | -| open * | bool | | If `true`, focus will be locked. | +| getDoc* | func | | Return the document to consider. We use it to implement the restore focus between different browser documents. | +| isEnabled* | func | | Do we still want to enforce the focus? This prop helps nesting TrapFocus elements. | +| open* | bool | | If `true`, focus will be locked. | The component cannot hold a ref. diff --git a/docs/src/modules/utils/generateMarkdown.js b/docs/src/modules/utils/generateMarkdown.js index b7ab2d3cf095e4..4fe830e841b0bb 100644 --- a/docs/src/modules/utils/generateMarkdown.js +++ b/docs/src/modules/utils/generateMarkdown.js @@ -319,7 +319,7 @@ function generateProps(reactAPI) { /\.isRequired/.test(prop.type.raw) || (chainedPropType !== false && chainedPropType.required) ) { - propRaw = `${propRaw} *`; + propRaw = `${propRaw}*`; } else { propRaw = `${propRaw}`; }