@input-output-hk/front-end-core-components
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -52,3 +52,3 @@ "use strict"; | ||
isStatic: _propTypes["default"].func, | ||
component: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].func]) | ||
component: _propTypes["default"].any | ||
}; | ||
@@ -74,3 +74,5 @@ | ||
var ref = componentProps.elRef; | ||
delete componentProps.component; | ||
delete componentProps.elRef; | ||
@@ -82,3 +84,5 @@ if (typeof Component === 'string') { | ||
return _react["default"].createElement(Component, componentProps); | ||
return _react["default"].createElement(Component, (0, _extends2["default"])({}, componentProps, { | ||
ref: ref | ||
})); | ||
}; | ||
@@ -98,3 +102,3 @@ | ||
return _react["default"].createElement(LinkInner, (0, _extends2["default"])({}, props, { | ||
ref: ref, | ||
elRef: ref, | ||
lang: lang, | ||
@@ -110,4 +114,4 @@ isStatic: isStatic, | ||
isStatic: _propTypes["default"].func, | ||
ref: _propTypes["default"].any, | ||
component: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].func]) | ||
elRef: _propTypes["default"].any, | ||
component: _propTypes["default"].any | ||
}; | ||
@@ -119,2 +123,2 @@ Link.propTypes = { | ||
exports["default"] = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9MaW5rLmpzIl0sIm5hbWVzIjpbIkxpbmtDb250ZXh0IiwiUHJvdmlkZXIiLCJjaGlsZHJlbiIsImNvbXBvbmVudCIsImlzU3RhdGljIiwiaHJlZiIsImxhbmciLCJwcm9wVHlwZXMiLCJQcm9wVHlwZXMiLCJub2RlIiwiaXNSZXF1aXJlZCIsInN0cmluZyIsImZ1bmMiLCJvbmVPZlR5cGUiLCJMaW5rSW5uZXIiLCJwcm9wcyIsImdldEhyZWYiLCJtYXRjaCIsIlJlZ0V4cCIsIkNvbXBvbmVudCIsImNvbXBvbmVudFByb3BzIiwiaXNSZWxhdGl2ZSIsIkxpbmsiL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xcbiAgY29tcG9uZW50OiBQcm9wVHlwZXMuYW55XG59XG5cbkxpbmsucHJvcFR5cGVzID0ge1xuICBocmVmOiBQcm9wVHlwZXMuc3RyaW5nLmlzUmVxdWlyZWRcbn1cblxuZXhwb3J0IGRlZmF1bHQgTGlua1xuIl19 |
{ | ||
"name": "@input-output-hk/front-end-core-components", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "IOHK front-end web core React components", | ||
@@ -5,0 +5,0 @@ "main": "components/index.js", |
@@ -19,3 +19,3 @@ import React, { forwardRef, createContext } from 'react' | ||
isStatic: PropTypes.func, | ||
component: PropTypes.oneOfType([ PropTypes.string, PropTypes.func ]) | ||
component: PropTypes.any | ||
} | ||
@@ -41,3 +41,5 @@ | ||
const ref = componentProps.elRef | ||
delete componentProps.component | ||
delete componentProps.elRef | ||
if (typeof Component === 'string') { | ||
@@ -49,3 +51,3 @@ delete componentProps.isStatic | ||
return ( | ||
<Component {...componentProps} /> | ||
<Component {...componentProps} ref={ref} /> | ||
) | ||
@@ -57,3 +59,3 @@ } | ||
{({ lang, isStatic = () => false, component = 'a' } = {}) => ( | ||
<LinkInner {...props} ref={ref} lang={lang} isStatic={isStatic} component={component} /> | ||
<LinkInner {...props} elRef={ref} lang={lang} isStatic={isStatic} component={component} /> | ||
)} | ||
@@ -67,4 +69,4 @@ </LinkContext.Consumer> | ||
isStatic: PropTypes.func, | ||
ref: PropTypes.any, | ||
component: PropTypes.oneOfType([ PropTypes.string, PropTypes.func ]) | ||
elRef: PropTypes.any, | ||
component: PropTypes.any | ||
} | ||
@@ -71,0 +73,0 @@ |
Sorry, the diff of this file is not supported yet
193300
2305