@wordpress/widget-dashboard
Version:
Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.
29 lines • 1.12 kB
TypeScript
import type { WidgetType } from '@wordpress/widget-primitives';
interface WidgetPickerProps {
/**
* Called with the widget types selected by the user. The picker keeps
* its own selection state; consumers receive the resolved list when
* the "Select" action fires.
*/
onSelect: (widgetTypes: WidgetType[]) => void;
/**
* Accessible label for the picker's item list.
*
* @default __( 'Widget list' )
*/
itemListLabel?: string;
}
/**
* DataViews-driven widget type picker. Lists `widgetTypes` from the dashboard
* context as a grid of live previews, supports search via `name`/`title`, and
* exposes a single "Select" action with bulk support so users can insert one
* or several widgets at once.
*
* The policy in effect scopes the listing: a type it rejects for `insert`
* is not offered but keeps rendering where already placed.
*
* @param {WidgetPickerProps} props Component props.
*/
export declare function WidgetPicker({ onSelect, itemListLabel, }: WidgetPickerProps): import("react").JSX.Element;
export {};
//# sourceMappingURL=widget-picker.d.ts.map