@wordpress/global-styles-ui
Version:
Global Styles UI components for WordPress.
40 lines (39 loc) • 2.02 kB
JavaScript
;
Object.defineProperties(exports, {
__esModule: { value: true },
[Symbol.toStringTag]: { value: "Module" }
});
let _wordpress_i18n = require("@wordpress/i18n");
let _wordpress_components = require("@wordpress/components");
let _wordpress_block_editor = require("@wordpress/block-editor");
let __screen_header_tsx = require("./screen-header.cjs");
let __hooks_ts = require("./hooks.cjs");
let __lock_unlock_ts = require("./lock-unlock.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
// packages/global-styles-ui/src/screen-css.tsx
const { AdvancedPanel: StylesAdvancedPanel } = (0, __lock_unlock_ts.unlock)(_wordpress_block_editor.privateApis);
function ScreenCSS() {
const [style, setStyle] = (0, __hooks_ts.useStyle)("", void 0, "user", false);
const [inheritedStyle] = (0, __hooks_ts.useStyle)("", void 0, "merged", false);
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(__screen_header_tsx.ScreenHeader, {
title: (0, _wordpress_i18n.__)("Additional CSS"),
description: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
(0, _wordpress_i18n.__)("You can add custom CSS to further customize the appearance and layout of your site."),
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("br", {}),
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_wordpress_components.ExternalLink, {
href: (0, _wordpress_i18n.__)("https://developer.wordpress.org/advanced-administration/wordpress/css/"),
className: "global-styles-ui-screen-css-help-link",
children: (0, _wordpress_i18n.__)("Learn more about CSS")
})
] })
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
className: "global-styles-ui-screen-css",
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StylesAdvancedPanel, {
value: style,
onChange: setStyle,
inheritedValue: inheritedStyle
})
})] });
}
exports.default = ScreenCSS;
//# sourceMappingURL=screen-css.cjs.map