diff --git a/lib/link.js b/lib/link.js index 86fa63eaee7f9122e756179035017cf1d64f7d6d..f903a8387c58a49f962365b483e39decae52b327 100644 --- a/lib/link.js +++ b/lib/link.js @@ -1,4 +1,4 @@ -import React, { Component, Children } from 'react' +import React, { Component, Children, PropTypes } from 'react' import Router from './router' export default class Link extends Component { @@ -7,6 +7,13 @@ export default class Link extends Component { this.linkClicked = this.linkClicked.bind(this) } + static propTypes = { + children: PropTypes.oneOfType([ + PropTypes.string, + PropTypes.element + ]).isRequired + } + linkClicked (e) { if (e.target.nodeName === 'A' && (e.metaKey || e.ctrlKey || e.shiftKey || (e.nativeEvent && e.nativeEvent.which === 2))) {