cafe-art-components
Version:
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). https://hackernoon.com/creating-a-library-of-react-components-using-create-react-app-without-ejecting-d182df690c6b ## Available Scripts
24 lines (22 loc) • 667 B
JavaScript
import React from "react";
import "./TextInput.scss";
var TextInput = function TextInput(_ref) {
var _ref$type = _ref.type,
type = _ref$type === void 0 ? "text" : _ref$type,
label = _ref.label,
value = _ref.value,
_onChange = _ref.onChange;
return React.createElement("div", {
className: "simple-form-group"
}, label && React.createElement("label", {
className: "simple-text-label"
}, label), React.createElement("input", {
type: type,
className: "simple-text-input",
value: value,
onChange: function onChange(e) {
return _onChange && _onChange(e.target.value);
}
}));
};
export default TextInput;