-
Notifications
You must be signed in to change notification settings - Fork 9
/
AppMenuDrawer.js
57 lines (52 loc) · 1.13 KB
/
AppMenuDrawer.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import React, { Component } from 'react';
import './AppMenuDrawer.css'
import { Link } from "react-router-dom";
import { TweenMax, Sine } from 'gsap';
export default class Menu extends Component {
menuRef = React.createRef();
componentDidMount() {
const menuEl = this.menuRef.current;
TweenMax.set(menuEl, {
opacity: 0,
scale: 0,
transformOrigin: '100% 0%',
});
TweenMax.set(menuEl.childNodes, {
opacity: 0,
});
TweenMax.fromTo(
menuEl,
0.2,
{
opacity: 0,
scale: 0,
},
{
opacity: 1,
scale: 1,
ease: Sine.easeOut,
}
);
TweenMax.staggerFromTo(
menuEl.childNodes,
0.45,
{
opacity: 0,
},
{
delay: 0.1,
opacity: 1,
ease: Sine.easeOut,
},
0.04
);
}
render() {
const { firstName } = this.props
return <div className="menudrawer" ref={this.menuRef}>
<Link to="/">{firstName}'s Home</Link><br />
<Link to="/place">{firstName}'s Places</Link><br />
<Link to="/group">{firstName}'s Group Trips</Link>
</div>
}
}