@wordpress/global-styles-ui
Version:
Global Styles UI components for WordPress.
21 lines (20 loc) • 1.03 kB
JavaScript
import { __ } from "@wordpress/i18n";
import { privateApis } from "@wordpress/block-editor";
import { __experimentalText } from "@wordpress/components";
import BackgroundPanel from "./background-panel.mjs";
import { ScreenHeader } from "./screen-header.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-background.tsx
const { useHasBackgroundPanel } = unlock(privateApis);
function ScreenBackground() {
const [settings] = useSetting("");
const hasBackgroundPanel = useHasBackgroundPanel(settings);
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ScreenHeader, {
title: __("Background"),
description: /* @__PURE__ */ jsx(__experimentalText, { children: __("Set styles for the site's background.") })
}), hasBackgroundPanel && /* @__PURE__ */ jsx(BackgroundPanel, {})] });
}
export { ScreenBackground as default };
//# sourceMappingURL=screen-background.mjs.map