52 lines
1.0 KiB
Plaintext
52 lines
1.0 KiB
Plaintext
// @flow
|
|
|
|
import React from 'react';
|
|
import type { Node } from 'react';
|
|
import classNames from 'classnames';
|
|
import withStyles from '../styles/withStyles';
|
|
|
|
export const styles = (theme: Object) => {
|
|
const spacing = theme.spacing.unit * 3;
|
|
return {
|
|
root: {
|
|
flex: '1 1 auto',
|
|
overflowY: 'auto',
|
|
padding: `0 ${spacing}px ${spacing}px ${spacing}px`,
|
|
'&:first-child': {
|
|
paddingTop: spacing,
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
type ProvidedProps = {
|
|
classes: Object,
|
|
};
|
|
|
|
export type Props = {
|
|
/**
|
|
* The content of the component.
|
|
*/
|
|
children?: Node,
|
|
/**
|
|
* Useful to extend the style applied to components.
|
|
*/
|
|
classes?: Object,
|
|
/**
|
|
* @ignore
|
|
*/
|
|
className?: string,
|
|
};
|
|
|
|
function DialogContent(props: ProvidedProps & Props) {
|
|
const { classes, children, className, ...other } = props;
|
|
|
|
return (
|
|
<div className={classNames(classes.root, className)} {...other}>
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default withStyles(styles, { name: 'MuiDialogContent' })(DialogContent);
|