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

Commit 7a9174f

Browse files
committed
feat(expand-animation): render a specified class name to the animated content
1 parent 6379081 commit 7a9174f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Expand.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default class Expand extends React.Component {
1717
]),
1818
className: React.PropTypes.string,
1919
collapseDuration: React.PropTypes.number,
20+
componentChildClassName: React.PropTypes.string,
2021
componentDidExpand: React.PropTypes.func,
2122
componentWillExpand: React.PropTypes.func,
2223
expandDuration: React.PropTypes.number,

src/ExpandChild.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default class ExpandChild extends React.Component {
1212
React.PropTypes.node
1313
]),
1414
collapseDuration: React.PropTypes.number,
15+
componentChildClassName: React.PropTypes.string,
1516
componentDidExpand: React.PropTypes.func,
1617
componentWillExpand: React.PropTypes.func,
1718
expandDuration: React.PropTypes.number
@@ -128,7 +129,7 @@ export default class ExpandChild extends React.Component {
128129

129130
render() {
130131
return (
131-
<div style={this.state.style}>
132+
<div classNames={this.props.componentChildClassName} style={this.state.style}>
132133
{this.props.children}
133134
</div>
134135
);

0 commit comments

Comments
 (0)