-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 = ''; | ||
|
@@ -114,7 +117,9 @@ function generatePropType(type) { | |
} | ||
return `${type.name}: ${values}<br>`; | ||
} | ||
|
||
case 'HiddenProps': { | ||
return `[${type.name}](/layout/hidden)`; | ||
} | ||
default: | ||
return type.name; | ||
} | ||
|
@@ -177,7 +182,7 @@ function generateProps(props) { | |
} | ||
|
||
function generateClasses(styles) { | ||
return `## Classes | ||
return styles.classes.length ? `## Classes | ||
|
||
You can overrides all the class names injected by Material-UI thanks to the \`classes\` property. | ||
This property accepts the following keys: | ||
|
@@ -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}\`.` : ''; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that There was a problem hiding this comment. Choose a reason for hiding this commentThe 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) { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops 👍