@wordpress/widget-dashboard
Version:
Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.
19 lines • 667 B
TypeScript
import type { ReactNode } from 'react';
import type { WidgetContextValue } from '../types';
interface ProviderProps {
value: WidgetContextValue;
children: ReactNode;
}
/**
* Provides the current widget's identity to its render subtree.
*
* @param {ProviderProps} props Component props.
*/
export declare function WidgetContextProvider({ value, children, }: ProviderProps): React.ReactNode;
/**
* Returns the current widget's identity (`uuid`, `name`, `index`). Returns
* `null` when called outside a widget render subtree.
*/
export declare function useWidgetContext(): WidgetContextValue | null;
export {};
//# sourceMappingURL=widget-context.d.ts.map