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] Grid docs should refer to Hidden component/demo #6963

Merged
merged 3 commits into from
May 26, 2017
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/pages/component-api/Grid/Grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
| align | union:&nbsp;'flex-start'<br>&nbsp;'center'<br>&nbsp;'flex-end'<br>&nbsp;'stretch'<br> | 'stretch' | Defines the `align-items` style property. It's applied for all screen sizes. |
| direction | union:&nbsp;'row'<br>&nbsp;'row-reverse'<br>&nbsp;'column'<br>&nbsp;'column-reverse'<br> | 'row' | Defines the `flex-direction` style property. It is applied for all screen sizes. |
| gutter | union:&nbsp;0, 8, 16, 24, 40<br> | 16 | Defines the space between the type `item` component. It can only be used on a type `container` component. |
| hidden | HiddenProps | undefined | If provided, will wrap with Hidden component and given properties. |
| hidden | [HiddenProps](/layout/hidden) | undefined | If provided, will wrap with [Hidden](/component-api/Hidden) component and given properties. |
| justify | union:&nbsp;'flex-start', 'center', 'flex-end', 'space-between', 'space-around'<br> | 'flex-start' | Defines the `justify-content` style property. It is applied for all screen sizes. |
| wrap | union:&nbsp;'nowrap'<br>&nbsp;'wrap'<br>&nbsp;'wrap-reverse'<br> | 'wrap' | Defines the `flex-wrap` style property. It's applied for all screen sizes. |
| xs | union:&nbsp;boolean, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12<br> | | Defines the number of grids the component is going to use. It's applied for all the screen sizes with the lowest priority. |
Expand Down
11 changes: 0 additions & 11 deletions docs/src/pages/component-api/Menu/MenuList.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,4 @@
| children | node | | MenuList contents, normally `MenuItem`s. |

Any other properties supplied will be spread to the root element.
## Classes

You can overrides all the class names injected by Material-UI thanks to the `classes` property.
This property accepts the following keys:


Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names)
section for more detail.

If using the `overrides` key of the theme as documented
[here](/customization/themes#customizing-all-instances-of-a-component-type),
you need to use the following style sheet name: `null`.
11 changes: 0 additions & 11 deletions docs/src/pages/component-api/TextField/TextField.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,4 @@
| value | union:&nbsp;string<br>&nbsp;number<br> | | The value of the `Input` element, required for a controlled component. |

Any other properties supplied will be spread to the root element.
## Classes

You can overrides all the class names injected by Material-UI thanks to the `classes` property.
This property accepts the following keys:


Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names)
section for more detail.

If using the `overrides` key of the theme as documented
[here](/customization/themes#customizing-all-instances-of-a-component-type),
you need to use the following style sheet name: `null`.
11 changes: 0 additions & 11 deletions docs/src/pages/component-api/styles/MuiThemeProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,4 @@
| theme | object | | |

Any other properties supplied will be spread to the root element.
## Classes

You can overrides all the class names injected by Material-UI thanks to the `classes` property.
This property accepts the following keys:


Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names)
section for more detail.

If using the `overrides` key of the theme as documented
[here](/customization/themes#customizing-all-instances-of-a-component-type),
you need to use the following style sheet name: `null`.
11 changes: 0 additions & 11 deletions docs/src/pages/component-api/transitions/Fade.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,4 @@
| onExited | Function | | Callback fired when the component has exited. |

Any other properties supplied will be spread to the root element.
## Classes

You can overrides all the class names injected by Material-UI thanks to the `classes` property.
This property accepts the following keys:


Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names)
section for more detail.

If using the `overrides` key of the theme as documented
[here](/customization/themes#customizing-all-instances-of-a-component-type),
you need to use the following style sheet name: `null`.
11 changes: 0 additions & 11 deletions docs/src/pages/component-api/transitions/Slide.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,4 @@
| onExited | function | | Callback fired when the component has exited. |

Any other properties supplied will be spread to the root element.
## Classes

You can overrides all the class names injected by Material-UI thanks to the `classes` property.
This property accepts the following keys:


Have a look at [overriding with class names](/customization/overrides#overriding-with-class-names)
section for more detail.

If using the `overrides` key of the theme as documented
[here](/customization/themes#customizing-all-instances-of-a-component-type),
you need to use the following style sheet name: `null`.
13 changes: 9 additions & 4 deletions scripts/generate-docs-markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ function generatePropDescription(required, description, type) {

// two new lines result in a newline in the table. all other new lines
// must be eliminated to prevent markdown mayhem.
const jsDocText = parsed.description.replace(/\n\n/g, '<br>').replace(/\n/g, ' ');
const jsDocText = parsed.description
.replace(/\n\n/g, '<br>')
.replace(/\n/g, ' ')
.replace(/\r/g, '');

if (parsed.tags.some(tag => tag.title === 'ignore')) return null;
let signature = '';
Expand Down Expand Up @@ -114,7 +117,9 @@ function generatePropType(type) {
}
return `${type.name}:&nbsp;${values}<br>`;
}

case 'HiddenProps': {
return `[${type.name}](/layout/hidden)`;
}
default:
return type.name;
}
Expand Down Expand Up @@ -177,7 +182,7 @@ function generateProps(props) {
}

function generateClasses(styles) {
return `## Classes
return styles.classes.length ? `## Classes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops 👍


You can overrides all the class names injected by Material-UI thanks to the \`classes\` property.
This property accepts the following keys:
Expand All @@ -188,7 +193,7 @@ section for more detail.

If using the \`overrides\` key of the theme as documented
[here](/customization/themes#customizing-all-instances-of-a-component-type),
you need to use the following style sheet name: \`${styles.name}\`.`;
you need to use the following style sheet name: \`${styles.name}\`.` : '';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that styles.name should always be defined. No need to be defensive.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the other side of the ternary that checks for styles.classes.length

}

export default function generateMarkdown(name, reactAPI) {
Expand Down
2 changes: 1 addition & 1 deletion src/Grid/Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ type Props = {
*/
gutter?: 0 | 8 | 16 | 24 | 40,
/**
* If provided, will wrap with Hidden component and given properties.
* If provided, will wrap with [Hidden](/component-api/Hidden) component and given properties.
*/
hidden?: HiddenProps,
/**
Expand Down