UNPKG

@up-group/react-controls

Version:

We know that there are a ton of react UI library projects to choose from. Our hope with this one is to provide the next generation of react components that you can use to bootstrap your next project, or as a reference for building a UIKit. Read on to get

37 lines 1.49 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var React = require("react"); var styles_1 = require("./styles"); var MethodTypePush = 'push'; var Link = (function (_super) { __extends(Link, _super); function Link(props) { var _this = _super.call(this, props) || this; _this.handleClick = function (e) { _this.props.onClick(e); }; return _this; } Link.prototype.render = function () { var _a = this.props, label = _a.label, children = _a.children, color = _a.color, href = _a.href, plain = _a.plain; return (React.createElement(styles_1.default, { plain: plain, href: href, color: color, onClick: this.handleClick }, label || children)); }; Link.defaultProps = { method: MethodTypePush, onClick: function (e) { } }; return Link; }(React.Component)); exports.Link = Link; exports.default = Link; //# sourceMappingURL=index.js.map