UNPKG

@wordpress/components

Version:
22 lines (21 loc) • 756 B
import { observableMap } from "@wordpress/compose"; import { createContext } from "@wordpress/element"; import warning from "@wordpress/warning"; // packages/components/src/slot-fill/context.ts const initialValue = { slots: observableMap(), fills: observableMap(), registerSlot: () => { warning("Components must be wrapped within `SlotFillProvider`. See https://developer.wordpress.org/block-editor/components/slot-fill/"); }, unregisterSlot: () => {}, updateSlot: () => {}, registerFill: () => {}, unregisterFill: () => {}, updateFill: () => {}, isDefault: true }; const SlotFillContext = createContext(initialValue); SlotFillContext.displayName = "SlotFillContext"; export { SlotFillContext as default }; //# sourceMappingURL=context.mjs.map