@wordpress/components
Version:
UI components for WordPress.
28 lines (27 loc) • 724 B
JavaScript
import { RgbInput } from "./rgb-input.mjs";
import { HslInput } from "./hsl-input.mjs";
import { HexInput } from "./hex-input.mjs";
import { jsx } from "react/jsx-runtime";
// packages/components/src/color-picker/color-input.tsx
const ColorInput = ({ colorType, color, hsla, onChange, onHSLChange, enableAlpha }) => {
switch (colorType) {
case "hsl": return /* @__PURE__ */ jsx(HslInput, {
hsla,
onChange: onHSLChange,
enableAlpha
});
case "rgb": return /* @__PURE__ */ jsx(RgbInput, {
color,
onChange,
enableAlpha
});
default:
case "hex": return /* @__PURE__ */ jsx(HexInput, {
color,
onChange,
enableAlpha
});
}
};
export { ColorInput };
//# sourceMappingURL=color-input.mjs.map