File tree Expand file tree Collapse file tree 7 files changed +19
-28
lines changed
Expand file tree Collapse file tree 7 files changed +19
-28
lines changed Original file line number Diff line number Diff line change 7474 "mocha" : " ^2.5.3" ,
7575 "node-libs-browser" : " ^1.0.0" ,
7676 "raw-loader" : " ^0.5.1" ,
77- "react" : " ^15.2.1 " ,
78- "react-addons-test-utils" : " ^15.2.1 " ,
77+ "react" : " ^15.3.0 " ,
78+ "react-addons-test-utils" : " ^15.3.0 " ,
7979 "react-bootstrap" : " ^0.29.5" ,
8080 "react-component-metadata" : " ^3.0.0" ,
81- "react-dom" : " ^15.2.1 " ,
81+ "react-dom" : " ^15.3.0 " ,
8282 "react-hot-loader" : " ^1.3.0" ,
8383 "release-script" : " ^1.0.2" ,
8484 "rimraf" : " ^2.5.3" ,
9494 "dependencies" : {
9595 "classnames" : " ^2.2.5" ,
9696 "dom-helpers" : " ^2.4.0" ,
97- "react-prop-types" : " ^0.3.2 " ,
97+ "react-prop-types" : " ^0.4.0 " ,
9898 "warning" : " ^3.0.0"
9999 }
100100}
Original file line number Diff line number Diff line change 11import getOffset from 'dom-helpers/query/offset' ;
22import requestAnimationFrame from 'dom-helpers/util/requestAnimationFrame' ;
33import React from 'react' ;
4- import mountable from 'react-prop-types/lib/mountable ' ;
4+ import componentOrElement from 'react-prop-types/lib/componentOrElement ' ;
55
66import Affix from './Affix' ;
77import addEventListener from './utils/addEventListener' ;
@@ -155,7 +155,7 @@ AutoAffix.propTypes = {
155155 * of viewport, or a function that returns it
156156 */
157157 container : React . PropTypes . oneOfType ( [
158- mountable ,
158+ componentOrElement ,
159159 React . PropTypes . func
160160 ] ) ,
161161 /**
Original file line number Diff line number Diff line change 11/*eslint-disable react/prop-types */
22import React , { cloneElement } from 'react' ;
33import warning from 'warning' ;
4- import mountable from 'react-prop-types/lib/mountable ' ;
4+ import componentOrElement from 'react-prop-types/lib/componentOrElement ' ;
55import elementType from 'react-prop-types/lib/elementType' ;
66
77import Portal from './Portal' ;
@@ -54,7 +54,7 @@ const Modal = React.createClass({
5454 * page content can be placed behind a virtual backdrop as well as a visual one.
5555 */
5656 container : React . PropTypes . oneOfType ( [
57- mountable ,
57+ componentOrElement ,
5858 React . PropTypes . func
5959 ] ) ,
6060
Original file line number Diff line number Diff line change @@ -121,11 +121,13 @@ Overlay.propTypes = {
121121 *
122122 * @type func
123123 */
124- onHide ( props , name , cname ) {
125- let pt = React . PropTypes . func ;
124+ onHide ( props , ...args ) {
125+ let propType = React . PropTypes . func ;
126+ if ( props . rootClose ) {
127+ propType = propType . isRequired ;
128+ }
126129
127- if ( props . rootClose ) pt = pt . isRequired
128- return pt ( props , name , cname )
130+ return propType ( props , ...args )
129131 } ,
130132
131133 /**
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import ReactDOM from 'react-dom' ;
3- import mountable from 'react-prop-types/lib/mountable ' ;
3+ import componentOrElement from 'react-prop-types/lib/componentOrElement ' ;
44import ownerDocument from './utils/ownerDocument' ;
55import getContainer from './utils/getContainer' ;
66
@@ -19,7 +19,7 @@ let Portal = React.createClass({
1919 * appended to it.
2020 */
2121 container : React . PropTypes . oneOfType ( [
22- mountable ,
22+ componentOrElement ,
2323 React . PropTypes . func
2424 ] )
2525 } ,
Original file line number Diff line number Diff line change 11import classNames from 'classnames' ;
22import React , { cloneElement } from 'react' ;
33import ReactDOM from 'react-dom' ;
4- import mountable from 'react-prop-types/lib/mountable ' ;
4+ import componentOrElement from 'react-prop-types/lib/componentOrElement ' ;
55
66import calculatePosition from './utils/calculatePosition' ;
77import getContainer from './utils/getContainer' ;
@@ -131,14 +131,14 @@ Position.propTypes = {
131131 * be positioned next to the `target` specified.
132132 */
133133 target : React . PropTypes . oneOfType ( [
134- mountable , React . PropTypes . func
134+ componentOrElement , React . PropTypes . func
135135 ] ) ,
136136
137137 /**
138138 * "offsetParent" of the component
139139 */
140140 container : React . PropTypes . oneOfType ( [
141- mountable , React . PropTypes . func
141+ componentOrElement , React . PropTypes . func
142142 ] ) ,
143143 /**
144144 * Minimum spacing in pixels between container border and component border
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments