UNPKG

2.87 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 rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
8import { styled } from "../zero-styled/index.js";
9import { useDefaultProps } from "../DefaultPropsProvider/index.js";
10import Typography from "../Typography/index.js";
11import { getDialogContentTextUtilityClass } from "./dialogContentTextClasses.js";
12import { jsx as _jsx } from "react/jsx-runtime";
13const useUtilityClasses = ownerState => {
14 const {
15 classes
16 } = ownerState;
17 const slots = {
18 root: ['root']
19 };
20 const composedClasses = composeClasses(slots, getDialogContentTextUtilityClass, classes);
21 return {
22 ...classes,
23 // forward classes to the Typography
24 ...composedClasses
25 };
26};
27const DialogContentTextRoot = styled(Typography, {
28 shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',
29 name: 'MuiDialogContentText',
30 slot: 'Root',
31 overridesResolver: (props, styles) => styles.root
32})({});
33const DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentText(inProps, ref) {
34 const props = useDefaultProps({
35 props: inProps,
36 name: 'MuiDialogContentText'
37 });
38 const {
39 children,
40 className,
41 ...ownerState
42 } = props;
43 const classes = useUtilityClasses(ownerState);
44 return /*#__PURE__*/_jsx(DialogContentTextRoot, {
45 component: "p",
46 variant: "body1",
47 color: "textSecondary",
48 ref: ref,
49 ownerState: ownerState,
50 className: clsx(classes.root, className),
51 ...props,
52 classes: classes
53 });
54});
55process.env.NODE_ENV !== "production" ? DialogContentText.propTypes /* remove-proptypes */ = {
56 // ┌────────────────────────────── Warning ──────────────────────────────┐
57 // │ These PropTypes are generated from the TypeScript type definitions. │
58 // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
59 // └─────────────────────────────────────────────────────────────────────┘
60 /**
61 * The content of the component.
62 */
63 children: PropTypes.node,
64 /**
65 * Override or extend the styles applied to the component.
66 */
67 classes: PropTypes.object,
68 /**
69 * @ignore
70 */
71 className: PropTypes.string,
72 /**
73 * The system prop that allows defining system overrides as well as additional CSS styles.
74 */
75 sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
76} : void 0;
77export default DialogContentText;
\No newline at end of file