@gechiui/components
Version:
UI components for GeChiUI.
38 lines (33 loc) • 682 B
JavaScript
import { createElement } from "@gechiui/element";
/**
* External dependencies
*/
/**
* 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