Skip to content

Commit 57f93ae

Browse files
committed
Demo makes the advantage of use with content of different heights apparent.
1 parent b8039a0 commit 57f93ae

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

demo/assets/img/vista1.jpg

-10.1 KB
Loading

demo/assets/img/vista3.jpg

-4.49 KB
Loading

demo/assets/transitions.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ body {
3535
}
3636
.fade-wait-leave.fade-wait-leave-active {
3737
opacity: 0;
38-
transition: opacity .5s ease-in;
38+
transition: opacity .4s ease-in;
3939
}
4040

4141
.fade-wait-enter {
@@ -44,7 +44,7 @@ body {
4444
.fade-wait-enter.fade-wait-enter-active {
4545
opacity: 1;
4646
/* Delay the enter animation until the leave completes */
47-
transition: opacity .5s ease-in .5s;
47+
transition: opacity .4s ease-in .6s;
4848
}
4949

5050
.fade-wait-height {

demo/components/Demo.jsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,21 @@ class Demo extends React.Component {
3737
<p className="text-danger"><em>Click any content to trigger the transition.</em></p>
3838

3939
<h2>Cross-fade transition</h2>
40-
<ContentSwapper transitionName="cross-fade" transitionEnterTimeout={1000} transitionLeaveTimeout={1000}
41-
transitionHeight={false}>
42-
<img key="img1" src="/img/vista1.jpg" width="600" height="280"/>
40+
<ContentSwapper transitionName="cross-fade" transitionEnterTimeout={1000} transitionLeaveTimeout={1000}>
41+
<img key="img1" src="/img/vista1.jpg" width="600" height="235"/>
4342
<img key="img2" src="/img/vista2.jpg" width="600" height="280"/>
4443
</ContentSwapper>
4544

4645
<h2>Fade out, then fade in transition</h2>
47-
<ContentSwapper transitionName="fade-wait" transitionEnterTimeout={1000} transitionLeaveTimeout={1000}>
46+
<ContentSwapper transitionName="fade-wait" transitionEnterTimeout={1000} transitionLeaveTimeout={400}>
4847
<ContentLong key="long"/>
4948
<ContentShort key="short"/>
5049
</ContentSwapper>
5150

5251
<h2>Carousel transition</h2>
53-
<ContentSwapper style={{width: 600}}
54-
transitionName="carousel-swap" transitionEnterTimeout={500} transitionLeaveTimeout={500}
55-
transitionHeight={false}>
56-
<img key="img3" src="/img/vista3.jpg" width="600" height="280"/>
52+
<ContentSwapper transitionName="carousel-swap" transitionEnterTimeout={500} transitionLeaveTimeout={500}
53+
style={{width: 600}}>
54+
<img key="img3" src="/img/vista3.jpg" width="600" height="255"/>
5755
<img key="img4" src="/img/vista4.jpg" width="600" height="280"/>
5856
</ContentSwapper>
5957

0 commit comments

Comments
 (0)