UNPKG

@wordpress/widget-dashboard

Version:

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

24 lines • 1.33 kB
import type { ColumnSteps } from '@wordpress/grid'; /** * Resolves the column count a host asked for. A finite number is floored, * with a floor of one and no ceiling; a map keeps its finite positive * entries, keyed by container width, each count floored the same way, and * an `'auto'` step only when a floor is set, since the surface skips it * otherwise. Anything else, or a map left with no entries, is unset. How * many columns a surface can carry is the host's decision, not the * package's. * * @param columns Host-provided `gridSettings.columns`, if any. * @param minColumnWidth Host-provided `gridSettings.minColumnWidth`, if any. * @return The count, the steps, or `undefined` when the host set none. */ export declare function resolveDashboardColumns(columns?: number | ColumnSteps, minColumnWidth?: number): number | ColumnSteps | undefined; /** * Resolves the per-column floor a host asked for. A finite positive value is * the floor in pixels; anything else leaves it unset. * * @param minColumnWidth Host-provided `gridSettings.minColumnWidth`, if any. * @return The floor in pixels, or `undefined` when the host set none. */ export declare function resolveDashboardMinColumnWidth(minColumnWidth?: number): number | undefined; //# sourceMappingURL=resolve-dashboard-column-count.d.ts.map