Skip to content

Commit

Permalink
Restore yet more prop descriptions mysteriously killed by 'yarn propt…
Browse files Browse the repository at this point in the history
…ypes --disable-cache'
  • Loading branch information
mbrookes committed Sep 19, 2020
1 parent 90e7679 commit 8e280c2
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 27 deletions.
1 change: 1 addition & 0 deletions docs/pages/api-docs/image-list-item-bar.md
Expand Up @@ -34,6 +34,7 @@ The `MuiImageListItemBar` name can be used for providing [default props](/custom
| <span class="prop-name">position</span> | <span class="prop-type">'bottom'<br>&#124;&nbsp;'top'</span> | <span class="prop-default">'bottom'</span> | Position of the title bar. |
| <span class="prop-name">subtitle</span> | <span class="prop-type">node</span> | | String or element serving as subtitle (support text). |
| <span class="prop-name">title</span> | <span class="prop-type">node</span> | | Title to be displayed on item. |
| ~~<span class="prop-name">titlePosition</span>~~ | <span class="prop-type">oneOf(['bottom'</span> | | *Deprecated*. Use the `position` prop instead.<br><br>Position of the title bar. |

The `ref` is forwarded to the root element.

Expand Down
3 changes: 3 additions & 0 deletions docs/pages/api-docs/image-list-item.md
Expand Up @@ -28,8 +28,11 @@ The `MuiImageListItem` name can be used for providing [default props](/customiza

| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|
| <span class="prop-name">children</span> | <span class="prop-type">node</span> | | While you can pass any node as children, the main use case is for an img. |
| <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">cols</span> | <span class="prop-type">number</span> | <span class="prop-default">1</span> | Width of the item in number of grid columns. |
| <span class="prop-name">component</span> | <span class="prop-type">elementType</span> | <span class="prop-default">'li'</span> | The component used for the root node. Either a string to use a HTML element or a component. |
| <span class="prop-name">rows</span> | <span class="prop-type">number</span> | <span class="prop-default">1</span> | Height of the item in number of grid rows. |

The `ref` is forwarded to the root element.

Expand Down
9 changes: 5 additions & 4 deletions docs/pages/api-docs/image-list.md
Expand Up @@ -28,13 +28,14 @@ The `MuiImageList` name can be used for providing [default props](/customization

| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|
| ~~<span class="prop-name">cellHeight</span>~~ | <span class="prop-type">oneOfType([PropTypes.number</span> | | *Deprecated*. Use the `rowHeight` prop instead.<br><br>Number of px for one cell height. You can set `'auto'` if you want to let the children determine the height. |
| ~~<span class="prop-name">cellHeight</span>~~ | <span class="prop-type">oneOfType([PropTypes.number</span> | | *Deprecated*. Use the `rowHeight` prop instead.<br><br>Cell height in `px`. Set to `'auto'` to let the children determine the height. |
| <span class="prop-name">children</span> | <span class="prop-type">node</span> | | Items that will be in the image list. |
| <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">cols</span> | <span class="prop-type">number</span> | <span class="prop-default">2</span> | Number of columns. |
| <span class="prop-name">component</span> | <span class="prop-type">elementType</span> | <span class="prop-default">'ul'</span> | The component used for the root node. Either a string to use a HTML element or a component. |
| <span class="prop-name">gap</span> | <span class="prop-type">number</span> | <span class="prop-default">4</span> | The gap between items in px. |
| <span class="prop-name">rowHeight</span> | <span class="prop-type">'auto'<br>&#124;&nbsp;number</span> | <span class="prop-default">180</span> | The height of one row in px. |
| ~~<span class="prop-name">spacing</span>~~ | <span class="prop-type">number</span> | | *Deprecated*. Use the `gap` prop instead.<br><br>Number of px for the spacing between tiles. |
| <span class="prop-name">gap</span> | <span class="prop-type">number</span> | <span class="prop-default">4</span> | The gap between items in `px`. |
| <span class="prop-name">rowHeight</span> | <span class="prop-type">'auto'<br>&#124;&nbsp;number</span> | <span class="prop-default">180</span> | The height of one row in `px`. |
| ~~<span class="prop-name">spacing</span>~~ | <span class="prop-type">number</span> | | *Deprecated*. Use the `gap` prop instead.<br><br>The spacing between items in `px`. |

The `ref` is forwarded to the root element.

Expand Down
18 changes: 11 additions & 7 deletions packages/material-ui/src/ImageList/ImageList.d.ts
Expand Up @@ -4,26 +4,30 @@ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
export interface ImageListTypeMap<P = {}, D extends React.ElementType = 'ul'> {
props: P & {
/**
* Number of px for one cell height.
* You can set `'auto'` if you want to let the children determine the height.
* @deprecated use rowHeight instead.
* Cell height in `px`.
* Set to `'auto'` to let the children determine the height.
* @deprecated Use rowHeight instead.
*/
cellHeight?: number | 'auto';
/**
* Items that will be in the image list.
*/
children?: React.ReactNode;
/**
* Number of columns.
*/
cols?: number;
/**
* The gap between items in px.
* The gap between items in `px`.
*/
gap?: number;
/**
* The height of one row in px.
* The height of one row in `px`.
*/
rowHeight?: number | 'auto';
/**
* Number of px for the spacing between tiles.
* @deprecated use gap instead.
* The spacing between items in `px`.
* @deprecated Use gap instead.
*/
spacing?: number;
};
Expand Down
16 changes: 8 additions & 8 deletions packages/material-ui/src/ImageList/ImageList.js
Expand Up @@ -80,16 +80,16 @@ ImageList.propTypes = {
// | To update them edit the d.ts file and run "yarn proptypes" |
// ----------------------------------------------------------------------
/**
* Number of px for one cell height.
* You can set `'auto'` if you want to let the children determine the height.
* @deprecated use rowHeight instead.
* Cell height in `px`.
* Set to `'auto'` to let the children determine the height.
* @deprecated Use rowHeight instead.
*/
cellHeight: deprecatedPropType(
PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]),
'Use the `rowHeight` prop instead.',
),
/**
* @ignore
* Items that will be in the image list.
*/
children: PropTypes.node,
/**
Expand All @@ -111,16 +111,16 @@ ImageList.propTypes = {
*/
component: PropTypes /* @typescript-to-proptypes-ignore */.elementType,
/**
* The gap between items in px.
* The gap between items in `px`.
*/
gap: PropTypes.number,
/**
* The height of one row in px.
* The height of one row in `px`.
*/
rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]),
/**
* Number of px for the spacing between tiles.
* @deprecated use gap instead.
* The spacing between items in `px`.
* @deprecated Use gap instead.
*/
spacing: deprecatedPropType(PropTypes.number, 'Use the `gap` prop instead.'),
/**
Expand Down
16 changes: 13 additions & 3 deletions packages/material-ui/src/ImageListItem/ImageListItem.d.ts
Expand Up @@ -2,9 +2,19 @@ import * as React from 'react';
import { OverridableComponent, OverrideProps } from '../OverridableComponent';

export interface ImageListItemTypeMap<P = {}, D extends React.ElementType = 'li'> {
props: P & {
cols?: number;
rows?: number;
props: P & {
/**
* While you can pass any node as children, the main use case is for an img.
*/
children?: React.ReactNode,
/**
* Width of the item in number of grid columns.
*/
cols?: number;
/**
* Height of the item in number of grid rows.
*/
rows?: number;
};
defaultComponent: D;
classKey: ImageListItemClassKey;
Expand Down
6 changes: 3 additions & 3 deletions packages/material-ui/src/ImageListItem/ImageListItem.js
Expand Up @@ -124,7 +124,7 @@ ImageListItem.propTypes = {
// | To update them edit the d.ts file and run "yarn proptypes" |
// ----------------------------------------------------------------------
/**
* @ignore
* While you can pass any node as children, the main use case is for an img.
*/
children: PropTypes.node,
/**
Expand All @@ -137,7 +137,7 @@ ImageListItem.propTypes = {
*/
className: PropTypes.string,
/**
* @ignore
* Width of the item in number of grid columns.
*/
cols: PropTypes.number,
/**
Expand All @@ -146,7 +146,7 @@ ImageListItem.propTypes = {
*/
component: PropTypes /* @typescript-to-proptypes-ignore */.elementType,
/**
* @ignore
* Height of the item in number of grid rows.
*/
rows: PropTypes.number,
};
Expand Down
Expand Up @@ -24,7 +24,8 @@ export interface ImageListItemBarProps extends StandardProps<{}, ImageListItemBa
*/
title?: React.ReactNode;
/**
* @ignore
* Position of the title bar.
* @deprecated Use position instead.
*/
titlePosition?: 'top' | 'bottom';
}
Expand Down
Expand Up @@ -156,7 +156,8 @@ ImageListItemBar.propTypes = {
*/
title: PropTypes.node,
/**
* @ignore
* Position of the title bar.
* @deprecated Use position instead.
*/
titlePosition: deprecatedPropType(
PropTypes.oneOf(['bottom', 'top']),
Expand Down

0 comments on commit 8e280c2

Please sign in to comment.