Skip to content

Commit

Permalink
[Dialog] Simplify the DialogContentText implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Aug 18, 2018
1 parent 0395ee2 commit 616d12f
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions packages/material-ui/src/DialogContentText/DialogContentText.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,16 @@

import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
import Typography from '../Typography';

export const styles = theme => ({
export const styles = {
/* Styles applied to the root element. */
root: {
color: theme.palette.text.secondary,
},
});
root: {},
};

function DialogContentText(props) {
const { children, classes, className, ...other } = props;

return (
<Typography
component="p"
variant="subheading"
className={classNames(classes.root, className)}
{...other}
>
{children}
</Typography>
);
return <Typography component="p" variant="subheading" color="textSecondary" {...props} />;
}

DialogContentText.propTypes = {
Expand All @@ -38,10 +24,6 @@ DialogContentText.propTypes = {
* See [CSS API](#css-api) below for more details.
*/
classes: PropTypes.object.isRequired,
/**
* @ignore
*/
className: PropTypes.string,
};

export default withStyles(styles, { name: 'MuiDialogContentText' })(DialogContentText);

0 comments on commit 616d12f

Please sign in to comment.