react-mdl
Version:
React Components for Material Design Lite
26 lines (20 loc) • 597 B
JavaScript
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
const Content = props => {
const { children, className, component, ...otherProps } = props;
const classes = classNames('mdl-layout__content', className);
return React.createElement(component || 'div', {
className: classes,
...otherProps
}, children);
};
Content.propTypes = {
className: PropTypes.string,
component: PropTypes.oneOfType([
PropTypes.string,
PropTypes.elementType,
PropTypes.func
])
};
export default Content;