@wordpress/global-styles-ui
Version:
Global Styles UI components for WordPress.
56 lines (55 loc) • 1.86 kB
JavaScript
import { __ } from "@wordpress/i18n";
import { Tabs } from "@wordpress/ui";
import { ScreenHeader } from "./screen-header.mjs";
import ColorPalettePanel from "./color-palette-panel.mjs";
import GradientPalettePanel from "./gradients-palette-panel.mjs";
import DuotonePalettePanel from "./duotone-palette-panel.mjs";
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
// packages/global-styles-ui/src/screen-color-palette.tsx
function ScreenColorPalette({ name }) {
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ScreenHeader, {
title: __("Edit palette"),
description: __("The combination of colors used across the site and in color pickers.")
}), /* @__PURE__ */ jsxs(Tabs.Root, {
defaultValue: "color",
children: [
/* @__PURE__ */ jsx("div", {
className: "global-styles-ui-color-palette__tablist-container",
children: /* @__PURE__ */ jsxs(Tabs.List, {
className: "global-styles-ui-color-palette__tablist",
children: [
/* @__PURE__ */ jsx(Tabs.Tab, {
value: "color",
children: __("Color")
}),
/* @__PURE__ */ jsx(Tabs.Tab, {
value: "gradient",
children: __("Gradient")
}),
/* @__PURE__ */ jsx(Tabs.Tab, {
value: "duotone",
children: __("Duotone")
})
]
})
}),
/* @__PURE__ */ jsx(Tabs.Panel, {
value: "color",
tabIndex: -1,
children: /* @__PURE__ */ jsx(ColorPalettePanel, { name })
}),
/* @__PURE__ */ jsx(Tabs.Panel, {
value: "gradient",
tabIndex: -1,
children: /* @__PURE__ */ jsx(GradientPalettePanel, { name })
}),
/* @__PURE__ */ jsx(Tabs.Panel, {
value: "duotone",
tabIndex: -1,
children: /* @__PURE__ */ jsx(DuotonePalettePanel, { name })
})
]
})] });
}
export { ScreenColorPalette as default };
//# sourceMappingURL=screen-color-palette.mjs.map