tandem-front-end
Version:
Visual editor for web components
37 lines • 1.88 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("./index.scss");
var React = require("react");
// import { TextInputComponent } from "../../../inputs/text/";
var recompose_1 = require("recompose");
var InputComponent = function (_a) {
var value = _a.value, label = _a.label, onChange = _a.onChange;
return (React.createElement("div", { className: "field" }));
};
var HexInputComponent = function (_a) {
var value = _a.value;
return (React.createElement("div", { className: "fields" },
React.createElement(InputComponent, { label: "hex", value: 0 })));
};
var RGBAInputComponent = function (_a) {
var value = _a.value;
return (React.createElement("div", { className: "fields" },
React.createElement(InputComponent, { label: "r", value: 0 }),
React.createElement(InputComponent, { label: "g", value: 0 }),
React.createElement(InputComponent, { label: "b", value: 0 }),
React.createElement(InputComponent, { label: "a", value: 0 })));
};
var OPTIONS = [RGBAInputComponent, HexInputComponent];
var BaseRawColorInputComponent = function (_a) {
var value = _a.value, onSwitcherClick = _a.onSwitcherClick;
return (React.createElement("div", { className: "m-raw-color-input" },
React.createElement(RGBAInputComponent, { value: value }),
React.createElement("div", { className: "switcher" },
React.createElement("i", { className: "ion-arrow-up-b" }),
React.createElement("i", { className: "ion-arrow-down-b" }))));
};
var enhance = recompose_1.compose(recompose_1.pure, recompose_1.withState("currentInputIndex", "setCurrentInputIndex", 0), recompose_1.withHandlers({
onSwitcherClick: function () { return function () { }; }
}));
exports.RawColorInputComponent = enhance(BaseRawColorInputComponent);
//# sourceMappingURL=index.js.map