Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed May 16, 2021
1 parent cc1c444 commit 511e0b7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
1 change: 0 additions & 1 deletion docs/pages/api-docs/dialog-title.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"props": {
"children": { "type": { "name": "node" } },
"classes": { "type": { "name": "object" } },
"disableTypography": { "type": { "name": "bool" } },
"sx": { "type": { "name": "object" } }
},
"name": "DialogTitle",
Expand Down
7 changes: 6 additions & 1 deletion docs/src/modules/utils/defaultPropsHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,12 @@ function getPropsPath(functionBody) {
*/
(path) => {
const declaratorPath = path.get('declarations', 0);
if (declaratorPath.get('init', 'name').value === 'props') {
// find `const {} = props`
// but not `const styleProps = props`
if (
declaratorPath.get('init', 'name').value === 'props' &&
declaratorPath.get('id').type === 'ObjectPattern'
) {
propsPath = declaratorPath.get('id');
}
},
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/dialogs/CustomizedDialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const BootstrapDialogTitle = (props) => {
const { children, onClose, ...other } = props;

return (
<DialogTitle disableTypography sx={{ m: 0, p: 2 }} {...other}>
<DialogTitle sx={{ m: 0, p: 2 }} {...other}>
<Typography variant="h6" component="div">
{children}
</Typography>
Expand Down
2 changes: 1 addition & 1 deletion docs/src/pages/components/dialogs/CustomizedDialogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const BootstrapDialogTitle = (props: DialogTitleProps) => {
const { children, onClose, ...other } = props;

return (
<DialogTitle disableTypography sx={{ m: 0, p: 2 }} {...other}>
<DialogTitle sx={{ m: 0, p: 2 }} {...other}>
<Typography variant="h6" component="div">
{children}
</Typography>
Expand Down
1 change: 0 additions & 1 deletion docs/translations/api-docs/dialog-title/dialog-title.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"propDescriptions": {
"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.",
"disableTypography": "If <code>true</code>, the children won&#39;t be wrapped by a typography component. For instance, this can be useful to render an h4 instead of the default h2.",
"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."
},
"classDescriptions": { "root": { "description": "Styles applied to the root element." } }
Expand Down
6 changes: 0 additions & 6 deletions packages/material-ui/src/DialogTitle/DialogTitle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ export interface DialogTitleProps extends StandardProps<React.HTMLAttributes<HTM
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx?: SxProps<Theme>;
/**
* If `true`, the children won't be wrapped by a typography component.
* For instance, this can be useful to render an h4 instead of the default h2.
* @default false
*/
disableTypography?: boolean;
}

/**
Expand Down

0 comments on commit 511e0b7

Please sign in to comment.