UNPKG

@wordpress/widget-dashboard

Version:

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

31 lines • 1.24 kB
import type { Field } from '@wordpress/dataviews'; import type { WidgetAttributeValues } from '../../types'; export interface AttributesDropdownProps { /** * The high-relevance fields the inline surface would have shown. */ fields: Field<WidgetAttributeValues>[]; /** * Current attribute values. */ data: WidgetAttributeValues; /** * Stages an attribute edit, exactly like the inline controls do. */ onChange: (edits: Record<string, unknown>) => void; /** * Observes open-state changes, from the trigger and from dismissals. * The popover owns its lifecycle; the caller only listens, so the fit * can hold the collapsed presentation while the user is inside it. */ onOpenChange: (open: boolean) => void; } /** * Collapsed presentation of the prominent surface: a single trigger whose * popover holds the high-relevance fields as a form. The settings trigger * is not part of the collapse; it stays in the toolbar. * * @param {AttributesDropdownProps} props Component props. */ export declare function AttributesDropdown({ fields, data, onChange, onOpenChange, }: AttributesDropdownProps): React.ReactNode; //# sourceMappingURL=attributes-dropdown.d.ts.map