Skip to content

Commit

Permalink
[react-transition-group] Support optional classNames prop on `<CSST…
Browse files Browse the repository at this point in the history
…ransition/>`

Since v2.8.0, classNames prop has been optional.

See also:
- https://github.com/reactjs/react-transition-group/blob/v2.8.0/CHANGELOG.md
- reactjs/react-transition-group#481
  • Loading branch information
ybiquitous authored and alesn committed Apr 23, 2019
1 parent db6889f commit 46a1eb9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion types/react-transition-group/CSSTransition.d.ts
Expand Up @@ -33,7 +33,7 @@ declare namespace CSSTransition {
* ```
*/
interface CSSTransitionProps extends TransitionProps {
classNames: string | CSSTransitionClassNames;
classNames?: string | CSSTransitionClassNames;
}
}

Expand Down
2 changes: 1 addition & 1 deletion types/react-transition-group/index.d.ts
@@ -1,4 +1,4 @@
// Type definitions for react-transition-group 2.0
// Type definitions for react-transition-group 2.8
// Project: https://github.com/reactjs/react-transition-group
// Definitions by: Karol Janyst <https://github.com/LKay>
// Epskampie <https://github.com/Epskampie>
Expand Down
4 changes: 4 additions & 0 deletions types/react-transition-group/react-transition-group-tests.tsx
Expand Up @@ -120,6 +120,10 @@ const Test: React.StatelessComponent = () => {
>
<div>{ "test" }</div>
</CSSTransition>

<CSSTransition timeout={ 100 }>
<div>{ "test" }</div>
</CSSTransition>
</TransitionGroup>
);
};

0 comments on commit 46a1eb9

Please sign in to comment.