UNPKG

2.57 kBJavaScriptView Raw
1'use client';
2
3import * as React from 'react';
4import PropTypes from 'prop-types';
5import clsx from 'clsx';
6import composeClasses from '@mui/utils/composeClasses';
7import { styled } from "../zero-styled/index.js";
8import memoTheme from "../utils/memoTheme.js";
9import { useDefaultProps } from "../DefaultPropsProvider/index.js";
10import { getAccordionDetailsUtilityClass } from "./accordionDetailsClasses.js";
11import { jsx as _jsx } from "react/jsx-runtime";
12const useUtilityClasses = ownerState => {
13 const {
14 classes
15 } = ownerState;
16 const slots = {
17 root: ['root']
18 };
19 return composeClasses(slots, getAccordionDetailsUtilityClass, classes);
20};
21const AccordionDetailsRoot = styled('div', {
22 name: 'MuiAccordionDetails',
23 slot: 'Root',
24 overridesResolver: (props, styles) => styles.root
25})(memoTheme(({
26 theme
27}) => ({
28 padding: theme.spacing(1, 2, 2)
29})));
30const AccordionDetails = /*#__PURE__*/React.forwardRef(function AccordionDetails(inProps, ref) {
31 const props = useDefaultProps({
32 props: inProps,
33 name: 'MuiAccordionDetails'
34 });
35 const {
36 className,
37 ...other
38 } = props;
39 const ownerState = props;
40 const classes = useUtilityClasses(ownerState);
41 return /*#__PURE__*/_jsx(AccordionDetailsRoot, {
42 className: clsx(classes.root, className),
43 ref: ref,
44 ownerState: ownerState,
45 ...other
46 });
47});
48process.env.NODE_ENV !== "production" ? AccordionDetails.propTypes /* remove-proptypes */ = {
49 // ┌────────────────────────────── Warning ──────────────────────────────┐
50 // │ These PropTypes are generated from the TypeScript type definitions. │
51 // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
52 // └─────────────────────────────────────────────────────────────────────┘
53 /**
54 * The content of the component.
55 */
56 children: PropTypes.node,
57 /**
58 * Override or extend the styles applied to the component.
59 */
60 classes: PropTypes.object,
61 /**
62 * @ignore
63 */
64 className: PropTypes.string,
65 /**
66 * The system prop that allows defining system overrides as well as additional CSS styles.
67 */
68 sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
69} : void 0;
70export default AccordionDetails;
\No newline at end of file