UNPKG

@wordpress/widget-dashboard

Version:

Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.

15 lines • 714 B
type UsePendingWhenEditModeProps = { editMode: boolean; onEditChange?: (next: boolean) => void; }; type UsePendingWhenEditModeResult = (action: () => void) => void; /** * Runs an action immediately when already in edit mode. Otherwise enables * edit mode and runs the action after edit mode becomes active. * * @param {UsePendingWhenEditModeProps} params Current edit mode and the change handler. * @return {UsePendingWhenEditModeResult} Runs an action, deferring it until edit mode is active. */ export declare function usePendingWhenEditMode({ editMode, onEditChange, }: UsePendingWhenEditModeProps): UsePendingWhenEditModeResult; export {}; //# sourceMappingURL=use-pending-when-edit-mode.d.ts.map