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>
27 lines
678 B
TypeScript
27 lines
678 B
TypeScript
/**
|
|
* React custom hook that returns the value of any token defined in the
|
|
* SystemContext. It's mainly used internally in [`useOptions`](#useoptions)
|
|
* and [`useProps`](#useprops).
|
|
*
|
|
* @example
|
|
* import { SystemProvider, useToken } from "reakit-system";
|
|
*
|
|
* const system = {
|
|
* token: "value",
|
|
* };
|
|
*
|
|
* function Component(props) {
|
|
* const token = useToken("token", "default value");
|
|
* return <div {...props}>{token}</div>;
|
|
* }
|
|
*
|
|
* function App() {
|
|
* return (
|
|
* <SystemProvider unstable_system={system}>
|
|
* <Component />
|
|
* </SystemProvider>
|
|
* );
|
|
* }
|
|
*/
|
|
export declare function useToken<T = any>(token: string, defaultValue?: T): T;
|