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>
34 lines
925 B
JavaScript
34 lines
925 B
JavaScript
import { createElement, Fragment } from "react";
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
import classnames from 'classnames';
|
|
|
|
/**
|
|
* Internal dependencies
|
|
*/
|
|
import { Mark, MarkLabel } from './styles/range-control-styles';
|
|
export default function RangeMark(props) {
|
|
const {
|
|
className,
|
|
isFilled = false,
|
|
label,
|
|
style = {},
|
|
...otherProps
|
|
} = props;
|
|
const classes = classnames('components-range-control__mark', isFilled && 'is-filled', className);
|
|
const labelClasses = classnames('components-range-control__mark-label', isFilled && 'is-filled');
|
|
return createElement(Fragment, null, createElement(Mark, {
|
|
...otherProps,
|
|
"aria-hidden": "true",
|
|
className: classes,
|
|
isFilled: isFilled,
|
|
style: style
|
|
}), label && createElement(MarkLabel, {
|
|
"aria-hidden": "true",
|
|
className: labelClasses,
|
|
isFilled: isFilled,
|
|
style: style
|
|
}, label));
|
|
}
|
|
//# sourceMappingURL=mark.js.map
|