Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions src/addons/link/ReactLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,5 @@ function ReactLink(value, requestChange) {
this.requestChange = requestChange;
}

/**
* Creates a PropType that enforces the ReactLink API and optionally checks the
* type of the value being passed inside the link. Example:
*
* MyComponent.propTypes = {
* tabIndexLink: ReactLink.PropTypes.link(React.PropTypes.number)
* }
*/
function createLinkTypeChecker(linkType) {
var shapes = {
value: linkType === undefined
? React.PropTypes.any.isRequired
: linkType.isRequired,
requestChange: React.PropTypes.func.isRequired,
};
return React.PropTypes.shape(shapes);
}

ReactLink.PropTypes = {
link: createLinkTypeChecker,
};

module.exports = ReactLink;