UNPKG

seti-ramesesv1

Version:

Reusable components and context for Next.js apps

25 lines (22 loc) 833 B
import * as React from 'react'; import { jsx } from 'react/jsx-runtime'; import SvgIcon from '../SvgIcon/SvgIcon.js'; function createSvgIcon(path, displayName) { function Component(props, ref) { return /*#__PURE__*/jsx(SvgIcon, { "data-testid": process.env.NODE_ENV !== 'production' ? `${displayName}Icon` : undefined, 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)); } export { createSvgIcon as default }; //# sourceMappingURL=createSvgIcon.js.map