Completely updated React, fixed #11, (hopefully)

This commit is contained in:
2018-03-04 19:11:49 -05:00
parent 6e0afd6e2a
commit 34e5f5139a
13674 changed files with 333464 additions and 473223 deletions

View File

@@ -1,10 +1,9 @@
// @flow
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
export const styles = (theme: Object) => ({
export const styles = theme => ({
root: {
padding: theme.spacing.unit * 2,
'&:last-child': {
@@ -13,25 +12,30 @@ export const styles = (theme: Object) => ({
},
});
type ProvidedProps = {
classes: Object,
};
function CardContent(props) {
const { classes, className, component: Component, ...other } = props;
export type Props = {
return <Component className={classNames(classes.root, className)} {...other} />;
}
CardContent.propTypes = {
/**
* Useful to extend the style applied to components.
*/
classes?: Object,
classes: PropTypes.object.isRequired,
/**
* @ignore
*/
className?: string,
className: PropTypes.string,
/**
* The component used for the root node.
* Either a string to use a DOM element or a component.
*/
component: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
};
function CardContent(props: ProvidedProps & Props) {
const { classes, className, ...other } = props;
return <div className={classNames(classes.root, className)} {...other} />;
}
CardContent.defaultProps = {
component: 'div',
};
export default withStyles(styles, { name: 'MuiCardContent' })(CardContent);