@wordpress/widget-dashboard
Version:
Stateless rendering engine for widget dashboards: the WidgetDashboard compound component and its grid-settings kit.
32 lines • 1.32 kB
TypeScript
import type { WidgetType } from '@wordpress/widget-primitives';
import type { DashboardWidget } from '../../types';
type WidgetAttributesProps = {
/**
* The instance whose attributes these controls edit.
*/
widget: DashboardWidget<unknown>;
/**
* The instance's widget type, source of the attribute schema.
*/
widgetType: WidgetType;
};
/**
* Normal-mode controls: the `relevance: 'high'` attributes on a prominent
* surface, plus a settings entry point when needed.
*
* Inline controls appear only for the high-relevance fields; edits stage live
* and auto-save on the dashboard's shared debounce.
*
* The inline presentation holds only while it fits the header.
* When the fields' natural width exceeds the space the header can grant,
* they unmount and collapse into a dropdown holding them as a form; the
* settings trigger is not part of the collapse and stays in the toolbar.
* While collapsed, the last measurement is retained to decide when to
* expand back; remounting re-measures and re-collapses if the retained
* value went stale.
*
* @param {WidgetAttributesProps} props Component props.
*/
export declare function WidgetAttributes({ widget, widgetType, }: WidgetAttributesProps): React.ReactNode;
export {};
//# sourceMappingURL=widget-attributes.d.ts.map