UNPKG

@wordpress/components

Version:
21 lines (20 loc) 633 B
// packages/components/src/duotone-picker/duotone-swatch.tsx import { swatch } from "@wordpress/icons"; import ColorIndicator from "../color-indicator"; import Icon from "../icon"; import { getGradientFromCSSColors } from "./utils"; import { jsx as _jsx } from "react/jsx-runtime"; function DuotoneSwatch({ values }) { return values ? /* @__PURE__ */ _jsx(ColorIndicator, { colorValue: getGradientFromCSSColors(values, "135deg") }) : /* @__PURE__ */ _jsx(Icon, { icon: swatch }); } var duotone_swatch_default = DuotoneSwatch; export { duotone_swatch_default as default }; //# sourceMappingURL=duotone-swatch.js.map