This repository has been archived on 2024-09-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
front/node_modules/@mui/material/modern/utils/createSvgIcon.js
2024-09-18 13:34:19 -03:00

26 lines
791 B
JavaScript

'use client';
import * as React from 'react';
import SvgIcon from "../SvgIcon/index.js";
/**
* Private module reserved for @mui packages.
*/
import { jsx as _jsx } from "react/jsx-runtime";
export default function createSvgIcon(path, displayName) {
function Component(props, ref) {
return /*#__PURE__*/_jsx(SvgIcon, {
"data-testid": `${displayName}Icon`,
ref: ref,
...props,
children: path
});
}
if (process.env.NODE_ENV !== 'production') {
// Need to set `displayName` on the inner component for React.memo.
// React prior to 16.14 ignores `displayName` on the wrapper.
Component.displayName = `${displayName}Icon`;
}
Component.muiName = SvgIcon.muiName;
return /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(Component));
}