-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathLeftContent.js
38 lines (36 loc) · 1.04 KB
/
LeftContent.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import React, { Component } from 'react';
import Switcher from 'switcheroo';
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup';
import Panel from './Panel';
export default class LeftContent extends Component {
render() {
var panelItems = [
{ content: 'Some content' },
{ content: 'Other content' },
{ content: 'Even more content' }
];
return (
<div className="content-left">
<h2>Left Content</h2>
<Switcher
wrapper={CSSTransitionGroup}
transitionName="example"
transitionEnterTimeout={300}
transitionLeaveTimeout={300}
>
<div path="/route1">
Animated on Route 1 with ReactCSSTranstionGroup
</div>
<div path="/route2">
Animated on Route 2 with ReactCSSTranstionGroup
</div>
<Panel
path="/route3"
name="Stuff Animated with ReactCSSTransitionGroup"
items={panelItems}
/>
</Switcher>
</div>
);
}
}