@wordpress/widget-dashboard
Version:
Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.
24 lines • 1.03 kB
TypeScript
import type { WidgetType } from '@wordpress/widget-primitives';
import type { DashboardWidget } from '../../types';
export interface WidgetSettingsTriggerProps {
/**
* The instance whose settings surface this control opens.
*/
widget: DashboardWidget<unknown>;
/**
* The instance's widget type, used for the accessible label and the
* attributes guard.
*/
widgetType: WidgetType;
}
/**
* Per-instance control that toggles the shared settings surface; the single
* `WidgetSettings` at the root reacts to it. Clicking the control of the
* instance whose settings surface is already open closes it. Returns `null`
* when no attribute needs that surface (none, or all already promoted to the
* prominent one), so chrome can mount it unconditionally.
*
* @param {WidgetSettingsTriggerProps} props Component props.
*/
export declare function WidgetSettingsTrigger({ widget, widgetType, }: WidgetSettingsTriggerProps): React.ReactNode;
//# sourceMappingURL=widget-settings-trigger.d.ts.map