UNPKG

1.79 kBJavaScriptView Raw
1import _extends from "@babel/runtime/helpers/esm/extends";
2import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3import * as React from 'react';
4import PropTypes from 'prop-types';
5import clsx from 'clsx';
6import withStyles from '../styles/withStyles';
7export const styles = {
8 /* Styles applied to the root element. */
9 root: {
10 padding: 16,
11 '&:last-child': {
12 paddingBottom: 24
13 }
14 }
15};
16const CardContent = /*#__PURE__*/React.forwardRef(function CardContent(props, ref) {
17 const {
18 classes,
19 className,
20 component: Component = 'div'
21 } = props,
22 other = _objectWithoutPropertiesLoose(props, ["classes", "className", "component"]);
23
24 return /*#__PURE__*/React.createElement(Component, _extends({
25 className: clsx(classes.root, className),
26 ref: ref
27 }, other));
28});
29process.env.NODE_ENV !== "production" ? CardContent.propTypes = {
30 // ----------------------------- Warning --------------------------------
31 // | These PropTypes are generated from the TypeScript type definitions |
32 // | To update them edit the d.ts file and run "yarn proptypes" |
33 // ----------------------------------------------------------------------
34
35 /**
36 * The content of the component.
37 */
38 children: PropTypes.node,
39
40 /**
41 * Override or extend the styles applied to the component.
42 * See [CSS API](#css) below for more details.
43 */
44 classes: PropTypes.object,
45
46 /**
47 * @ignore
48 */
49 className: PropTypes.string,
50
51 /**
52 * The component used for the root node.
53 * Either a string to use a HTML element or a component.
54 */
55 component: PropTypes
56 /* @typescript-to-proptypes-ignore */
57 .elementType
58} : void 0;
59export default withStyles(styles, {
60 name: 'MuiCardContent'
61})(CardContent);
\No newline at end of file