UNPKG

@wordpress/global-styles-ui

Version:
18 lines (17 loc) • 922 B
import { __ } from "@wordpress/i18n"; import { privateApis } from "@wordpress/block-editor"; import { ScreenHeader } from "./screen-header.mjs"; import DimensionsPanel from "./dimensions-panel.mjs"; import { useSetting } from "./hooks.mjs"; import { unlock } from "./lock-unlock.mjs"; import { Fragment, jsx, jsxs } from "react/jsx-runtime"; // packages/global-styles-ui/src/screen-layout.tsx const { useHasDimensionsPanel, useSettingsForBlockElement } = unlock(privateApis); function ScreenLayout() { const [rawSettings] = useSetting(""); const settings = useSettingsForBlockElement(rawSettings); const hasDimensionsPanel = useHasDimensionsPanel(settings); return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ScreenHeader, { title: __("Layout") }), hasDimensionsPanel && /* @__PURE__ */ jsx(DimensionsPanel, {})] }); } export { ScreenLayout as default }; //# sourceMappingURL=screen-layout.mjs.map