Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 5551010

Browse files
committed
Use package react-transition-group
1 parent 19e4d4c commit 5551010

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848
"author": "Chi Vinh Le and contributors (https://github.com/wikiwi/react-css-transition/graphs/contributors)",
4949
"license": "MIT",
5050
"peerDependencies": {
51-
"react": "^0.14.0 || ^15.0.0-0",
52-
"react-addons-transition-group": "^0.14.0 || ^15.0.0-0"
51+
"react": "^15.0.0"
5352
},
5453
"devDependencies": {
5554
"@types/chai": "^3.4.34",
@@ -58,7 +57,6 @@
5857
"@types/jsdom": "^2.0.29",
5958
"@types/mocha": "^2.2.32",
6059
"@types/react": "^15.0.4",
61-
"@types/react-addons-transition-group": "^0.14.19",
6260
"@types/sinon": "^1.16.31",
6361
"awesome-typescript-loader": "^3.0.0-beta.18",
6462
"babel-core": "^6.22.1",
@@ -110,7 +108,6 @@
110108
"raw-loader": "^0.5.1",
111109
"react": "^15.4.2",
112110
"react-addons-test-utils": "^15.4.2",
113-
"react-addons-transition-group": "^15.4.2",
114111
"react-dom": "^15.4.2",
115112
"react-icons": "^2.2.3",
116113
"react-syntax-highlighter": "^4.0.1",
@@ -124,6 +121,7 @@
124121
"webpack-dev-server": "^1.16.2"
125122
},
126123
"dependencies": {
124+
"react-transition-group": "^1.0.0",
127125
"reassemble": "^0.5.0"
128126
}
129127
}

src/csstransitiongroup.spec.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe("csstransitiongroup.tsx", () => {
2525
const wrapper = getWrapper(
2626
{ id: "abc", children: <span key="child" /> },
2727
);
28-
const { id } = wrapper.find("ReactTransitionGroup").props();
28+
const { id } = wrapper.find("TransitionGroup").props();
2929
assert.strictEqual(id, "abc");
3030
});
3131

src/csstransitiongroup.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
Component, Children, ReactElement, HTMLAttributes,
44
ComponentClass, StatelessComponent, cloneElement,
55
} from "react";
6-
import * as ReactTransitionGroup from "react-addons-transition-group";
6+
import TransitionGroup from "react-transition-group/TransitionGroup";
77

88
import { CSSTransitionProps } from "./csstransition";
99

@@ -24,7 +24,7 @@ export class CSSTransitionGroup extends Component<CSSTransitionGroupProps, {}> {
2424
public render() {
2525
const { transitionAppear, children, ...rest } = this.props as any;
2626
return (
27-
<ReactTransitionGroup {...rest}>
27+
<TransitionGroup {...rest}>
2828
{Children.map(children, (child: ReactElement<any>, index) =>
2929
<CSSTransitionGroupChild
3030
transitionAppear={transitionAppear}
@@ -33,7 +33,7 @@ export class CSSTransitionGroup extends Component<CSSTransitionGroupProps, {}> {
3333
{child}
3434
</CSSTransitionGroupChild>,
3535
)}
36-
</ReactTransitionGroup>);
36+
</TransitionGroup>);
3737
}
3838
}
3939

src/global.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
declare module "fbjs/lib/shallowEqual";
2+
declare module "react-transition-group/TransitionGroup";

0 commit comments

Comments
 (0)