@wordpress/widget-dashboard
Version:
Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.
16 lines • 768 B
TypeScript
import { type Ref } from '@wordpress/element';
interface UseDashboardContainerColumnCountResult {
containerRef: Ref<HTMLDivElement>;
columnCount: number;
}
/**
* Tracks the dashboard grid container width and maps it to an opinionated
* column count (cap → 2 → 1). Measurement is container-based via
* `ResizeObserver`, not viewport media queries.
*
* @param {Ref< HTMLDivElement >} [forwardedRef] Ref forwarded from the grid wrapper.
* @param {number} [maxColumns] Column cap for wide containers.
*/
export declare function useDashboardContainerColumnCount(forwardedRef?: Ref<HTMLDivElement>, maxColumns?: number): UseDashboardContainerColumnCountResult;
export {};
//# sourceMappingURL=use-dashboard-container-column-count.d.ts.map