|
|
@ -32,6 +32,7 @@ class Link extends Component {
|
|
|
|
isDisabled,
|
|
|
|
isDisabled,
|
|
|
|
noRouter,
|
|
|
|
noRouter,
|
|
|
|
onPress,
|
|
|
|
onPress,
|
|
|
|
|
|
|
|
title,
|
|
|
|
...otherProps
|
|
|
|
...otherProps
|
|
|
|
} = this.props;
|
|
|
|
} = this.props;
|
|
|
|
|
|
|
|
|
|
|
@ -39,6 +40,10 @@ class Link extends Component {
|
|
|
|
let el = component;
|
|
|
|
let el = component;
|
|
|
|
|
|
|
|
|
|
|
|
if (to) {
|
|
|
|
if (to) {
|
|
|
|
|
|
|
|
if (title) {
|
|
|
|
|
|
|
|
linkProps.title = title;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if ((/\w+?:\/\//).test(to)) {
|
|
|
|
if ((/\w+?:\/\//).test(to)) {
|
|
|
|
el = 'a';
|
|
|
|
el = 'a';
|
|
|
|
linkProps.href = to;
|
|
|
|
linkProps.href = to;
|
|
|
@ -87,6 +92,7 @@ Link.propTypes = {
|
|
|
|
className: PropTypes.string,
|
|
|
|
className: PropTypes.string,
|
|
|
|
component: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
|
|
component: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
|
|
to: PropTypes.string,
|
|
|
|
to: PropTypes.string,
|
|
|
|
|
|
|
|
title: PropTypes.string,
|
|
|
|
target: PropTypes.string,
|
|
|
|
target: PropTypes.string,
|
|
|
|
isDisabled: PropTypes.bool,
|
|
|
|
isDisabled: PropTypes.bool,
|
|
|
|
noRouter: PropTypes.bool,
|
|
|
|
noRouter: PropTypes.bool,
|
|
|
|