1 | 'use client';
|
2 |
|
3 | import * as React from 'react';
|
4 | import PropTypes from 'prop-types';
|
5 | import clsx from 'clsx';
|
6 | import composeClasses from '@mui/utils/composeClasses';
|
7 | import { styled } from "../zero-styled/index.js";
|
8 | import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
9 | import { getCardContentUtilityClass } from "./cardContentClasses.js";
|
10 | import { jsx as _jsx } from "react/jsx-runtime";
|
11 | const useUtilityClasses = ownerState => {
|
12 | const {
|
13 | classes
|
14 | } = ownerState;
|
15 | const slots = {
|
16 | root: ['root']
|
17 | };
|
18 | return composeClasses(slots, getCardContentUtilityClass, classes);
|
19 | };
|
20 | const CardContentRoot = styled('div', {
|
21 | name: 'MuiCardContent',
|
22 | slot: 'Root',
|
23 | overridesResolver: (props, styles) => styles.root
|
24 | })({
|
25 | padding: 16,
|
26 | '&:last-child': {
|
27 | paddingBottom: 24
|
28 | }
|
29 | });
|
30 | const CardContent = React.forwardRef(function CardContent(inProps, ref) {
|
31 | const props = useDefaultProps({
|
32 | props: inProps,
|
33 | name: 'MuiCardContent'
|
34 | });
|
35 | const {
|
36 | className,
|
37 | component = 'div',
|
38 | ...other
|
39 | } = props;
|
40 | const ownerState = {
|
41 | ...props,
|
42 | component
|
43 | };
|
44 | const classes = useUtilityClasses(ownerState);
|
45 | return _jsx(CardContentRoot, {
|
46 | as: component,
|
47 | className: clsx(classes.root, className),
|
48 | ownerState: ownerState,
|
49 | ref: ref,
|
50 | ...other
|
51 | });
|
52 | });
|
53 | process.env.NODE_ENV !== "production" ? CardContent.propTypes = {
|
54 |
|
55 |
|
56 |
|
57 |
|
58 | |
59 |
|
60 |
|
61 | children: PropTypes.node,
|
62 | |
63 |
|
64 |
|
65 | classes: PropTypes.object,
|
66 | |
67 |
|
68 |
|
69 | className: PropTypes.string,
|
70 | |
71 |
|
72 |
|
73 |
|
74 | component: PropTypes.elementType,
|
75 | |
76 |
|
77 |
|
78 | sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
79 | } : void 0;
|
80 | export default CardContent; |
\ | No newline at end of file |