Add coexistence checks to all enqueue methods to prevent loading both React and Grid.js assets simultaneously. Changes: - ReactAdmin.php: Only enqueue React assets when ?react=1 - Init.php: Skip Grid.js when React active on admin pages - Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0 - Customer.php, Product.php, License.php: Add coexistence checks Now the toggle between Classic and React versions works correctly. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
37 lines
1.0 KiB
JavaScript
37 lines
1.0 KiB
JavaScript
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = void 0;
|
|
var _element = require("@wordpress/element");
|
|
/**
|
|
* WordPress dependencies
|
|
*/
|
|
|
|
/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */
|
|
|
|
/**
|
|
* Return an SVG icon.
|
|
*
|
|
* @param {IconProps} props icon is the SVG component to render
|
|
* size is a number specifiying the icon size in pixels
|
|
* Other props will be passed to wrapped SVG component
|
|
* @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element.
|
|
*
|
|
* @return {JSX.Element} Icon component
|
|
*/
|
|
function Icon({
|
|
icon,
|
|
size = 24,
|
|
...props
|
|
}, ref) {
|
|
return (0, _element.cloneElement)(icon, {
|
|
width: size,
|
|
height: size,
|
|
...props,
|
|
ref
|
|
});
|
|
}
|
|
var _default = exports.default = (0, _element.forwardRef)(Icon);
|
|
//# sourceMappingURL=index.js.map
|