UNPKG

@wordpress/components

Version:
34 lines (30 loc) 650 B
import { createElement } from "@wordpress/element"; /** * Internal dependencies */ import { RgbInput } from './rgb-input'; import { HslInput } from './hsl-input'; import { HexInput } from './hex-input'; export const ColorInput = _ref => { let { colorType, color, onChange, enableAlpha } = _ref; const props = { color, onChange, enableAlpha }; switch (colorType) { case 'hsl': return createElement(HslInput, props); case 'rgb': return createElement(RgbInput, props); default: case 'hex': return createElement(HexInput, props); } }; //# sourceMappingURL=color-input.js.map