UNPKG

@wordpress/global-styles-ui

Version:
41 lines (40 loc) • 1.02 kB
import { __experimentalHStack, __unstableMotion } from "@wordpress/components"; import PresetColors from "./preset-colors.mjs"; import PreviewWrapper from "./preview-wrapper.mjs"; import { jsx } from "react/jsx-runtime"; // packages/global-styles-ui/src/preview-colors.tsx const firstFrameVariants = { start: { scale: 1, opacity: 1 }, hover: { scale: 0, opacity: 0 } }; const StylesPreviewColors = ({ label, isFocused, withHoverView }) => { return /* @__PURE__ */ jsx(PreviewWrapper, { label, isFocused, withHoverView, children: ({ key }) => /* @__PURE__ */ jsx(__unstableMotion.div, { variants: firstFrameVariants, style: { height: "100%", overflow: "hidden" }, children: /* @__PURE__ */ jsx(__experimentalHStack, { spacing: 0, justify: "center", style: { height: "100%", overflow: "hidden" }, children: /* @__PURE__ */ jsx(PresetColors, {}) }) }, key) }); }; export { StylesPreviewColors as default }; //# sourceMappingURL=preview-colors.mjs.map