Repository URL to install this package:
|
Version:
4.0.59 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const styled_1 = require("./styled");
/**
* rendering a children, by default it renders the text
*/
function renderChildren(props) {
return props.children || props.text || 'Link';
}
exports.renderChildren = renderChildren;
/**
* rendering the Link
*/
function renderLink(props) {
const {
className,
target,
urlBase,
children,
dataQa
} = props,
remainingProps = tslib_1.__rest(props, ["className", "target", "urlBase", "children", "dataQa"]);
return react_1.default.createElement(styled_1.LinkElement, Object.assign({
className: className,
target: target,
urlBase: urlBase
}, remainingProps), children);
}
exports.renderLink = renderLink; //# sourceMappingURL=renderProps.js.map