forked from react-bootstrap/react-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[changed] deprecated Position, Transition, Portal
- Loading branch information
Showing
8 changed files
with
87 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
import deprecationWarning from './utils/deprecationWarning'; | ||
import Portal from 'react-overlays/lib/Portal'; | ||
|
||
export default Portal; | ||
export default deprecationWarning.wrapper(Portal, { | ||
message: | ||
'The Portal component is deprecated in react-bootstrap. It has been moved to a more generic library: react-overlays. ' + | ||
'You can read more at: ' + | ||
'http://react-bootstrap.github.io/react-overlays/examples/#portal and ' + | ||
'https://github.com/react-bootstrap/react-bootstrap/issues/1084' | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import deprecationWarning from './utils/deprecationWarning'; | ||
import Position from 'react-overlays/lib/Position'; | ||
|
||
export default Position; | ||
export default deprecationWarning.wrapper(Position, { | ||
message: | ||
'The Position component is deprecated in react-bootstrap. It has been moved to a more generic library: react-overlays. ' + | ||
'You can read more at: ' + | ||
'http://react-bootstrap.github.io/react-overlays/examples/#position and ' + | ||
'https://github.com/react-bootstrap/react-bootstrap/issues/1084' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
import deprecationWarning from './utils/deprecationWarning'; | ||
import Transition from 'react-overlays/lib/Transition'; | ||
|
||
export default Transition; | ||
export default deprecationWarning.wrapper(Transition, { | ||
message: | ||
'The Transition component is deprecated in react-bootstrap. It has been moved to a more generic library: react-overlays. ' + | ||
'You can read more at: ' + | ||
'http://react-bootstrap.github.io/react-overlays/examples/#transition and ' + | ||
'https://github.com/react-bootstrap/react-bootstrap/issues/1084' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
import ReactTestUtils from 'react/lib/ReactTestUtils'; | ||
import Position from '../src/Position'; | ||
import Transition from '../src/Transition'; | ||
import Portal from '../src/Portal'; | ||
|
||
import { shouldWarn } from './helpers'; | ||
|
||
describe('Components moved to react-overlays', ()=>{ | ||
|
||
it('should warn about Position', ()=>{ | ||
ReactTestUtils.renderIntoDocument(<Position><div/></Position>); | ||
|
||
shouldWarn(/Position component is deprecated/); | ||
}); | ||
|
||
it('should warn about Transition', ()=>{ | ||
ReactTestUtils.renderIntoDocument(<Transition><div/></Transition>); | ||
|
||
shouldWarn(/Transition component is deprecated/); | ||
}); | ||
|
||
it('should warn about Portal', ()=>{ | ||
ReactTestUtils.renderIntoDocument(<Portal><div/></Portal>); | ||
|
||
shouldWarn(/Portal component is deprecated/); | ||
}); | ||
}); |