diff --git a/src/CollapsableMixin.js b/src/CollapsableMixin.js index 3edd4c5503..1aae543000 100644 --- a/src/CollapsableMixin.js +++ b/src/CollapsableMixin.js @@ -2,11 +2,14 @@ import assign from './utils/Object.assign'; import deprecationWarning from './utils/deprecationWarning'; import CollapsibleMixin from './CollapsibleMixin'; +let link = 'https://github.com/react-bootstrap/react-bootstrap/issues/425#issuecomment-97110963'; + const CollapsableMixin = assign({}, CollapsibleMixin, { getCollapsableClassSet(className) { deprecationWarning( 'CollapsableMixin.getCollapsableClassSet()', - 'CollapsibleMixin.getCollapsibleClassSet()' + 'CollapsibleMixin.getCollapsibleClassSet()', + link ); return CollapsibleMixin.getCollapsibleClassSet.call(this, className); }, @@ -14,7 +17,8 @@ const CollapsableMixin = assign({}, CollapsibleMixin, { getCollapsibleDOMNode() { deprecationWarning( 'CollapsableMixin.getCollapsableDOMNode()', - 'CollapsibleMixin.getCollapsibleDOMNode()' + 'CollapsibleMixin.getCollapsibleDOMNode()', + link ); return this.getCollapsableDOMNode(); }, @@ -22,12 +26,13 @@ const CollapsableMixin = assign({}, CollapsibleMixin, { getCollapsibleDimensionValue() { deprecationWarning( 'CollapsableMixin.getCollapsableDimensionValue()', - 'CollapsibleMixin.getCollapsibleDimensionValue()' + 'CollapsibleMixin.getCollapsibleDimensionValue()', + link ); return this.getCollapsableDimensionValue(); } }); -deprecationWarning('CollapsableMixin', 'CollapsibleMixin'); +deprecationWarning('CollapsableMixin', 'CollapsibleMixin', link); export default CollapsableMixin; diff --git a/src/CollapsableNav.js b/src/CollapsableNav.js index 0e9b14f529..cc211684f3 100644 --- a/src/CollapsableNav.js +++ b/src/CollapsableNav.js @@ -3,6 +3,10 @@ import CollapsibleNav from './CollapsibleNav'; let CollapsableNav = CollapsibleNav; -deprecationWarning('CollapsableNav', 'CollapsibleNav'); +deprecationWarning( + 'CollapsableNav', + 'CollapsibleNav', + 'https://github.com/react-bootstrap/react-bootstrap/issues/425#issuecomment-97110963' +); export default CollapsableNav; diff --git a/src/CollapsibleMixin.js b/src/CollapsibleMixin.js index 3b6e738022..505b62909d 100644 --- a/src/CollapsibleMixin.js +++ b/src/CollapsibleMixin.js @@ -141,7 +141,8 @@ const CollapsibleMixin = { if (typeof this.getCollapsableDimension === 'function') { deprecationWarning( 'CollapsableMixin.getCollapsableDimension()', - 'CollapsibleMixin.getCollapsibleDimension()' + 'CollapsibleMixin.getCollapsibleDimension()', + 'https://github.com/react-bootstrap/react-bootstrap/issues/425#issuecomment-97110963' ); return this.getCollapsableDimension(); } diff --git a/src/index.js b/src/index.js index 047638f72c..f4b296d878 100644 --- a/src/index.js +++ b/src/index.js @@ -13,6 +13,7 @@ import Carousel from './Carousel'; import CarouselItem from './CarouselItem'; import Col from './Col'; import CollapsableMixin from './CollapsableMixin'; +import CollapsibleMixin from './CollapsibleMixin'; import DropdownButton from './DropdownButton'; import DropdownMenu from './DropdownMenu'; import DropdownStateMixin from './DropdownStateMixin'; @@ -66,6 +67,7 @@ export default { CarouselItem, Col, CollapsableMixin, + CollapsibleMixin, DropdownButton, DropdownMenu, DropdownStateMixin, diff --git a/src/utils/deprecationWarning.js b/src/utils/deprecationWarning.js index 44ed6435eb..2395cb4729 100644 --- a/src/utils/deprecationWarning.js +++ b/src/utils/deprecationWarning.js @@ -1,8 +1,10 @@ -export default function deprecationWarning(oldname, newname) { +export default function deprecationWarning(oldname, newname, link) { if (process.env.NODE_ENV !== 'production') { let message = `${oldname} is deprecated. Use ${newname} instead.`; console.warn(message); - let link = 'https://github.com/react-bootstrap/react-bootstrap/issues/425#issuecomment-97110963'; - console.warn(`You can read more about it here ${link}`); + + if (link) { + console.warn(`You can read more about it here ${link}`); + } } }