UNPKG

@arche-mc2/arche-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

29 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var React = require("react"); var styles_1 = require("./styles"); var theming_1 = require("../../../Common/theming"); exports.MethodTypePush = 'push'; var UpLink = function (props) { var children = props.children, href = props.href, onClick = props.onClick, target = props.target, dataFor = props.dataFor, label = props.label; var tooltipProps = {}; if (dataFor) { tooltipProps = { 'data-tip': 'tooltip', 'data-for': dataFor }; } var handleClick = function (e) { onClick(e); }; return (React.createElement("a", tslib_1.__assign({ className: styles_1.getStyles(props), href: href, target: target, onClick: handleClick }, tooltipProps), label || children)); }; exports.UpLink = UpLink; UpLink.defaultProps = { method: exports.MethodTypePush, onClick: function (e) { }, theme: theming_1.default, }; exports.default = theming_1.withTheme(UpLink); //# sourceMappingURL=UpLink.js.map