-
Notifications
You must be signed in to change notification settings - Fork 7
/
GridItem.js
51 lines (42 loc) · 1.06 KB
/
GridItem.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
/**
* @file 手动解锁的格状视图的单个元素
* @author Leo Wang([email protected])
*/
import React, {Component} from 'react'
import {
Animated,
View,
Text,
StyleSheet
} from 'react-native';
var styles = require('./styles');
class GridItem extends Component {
constructor(props) {
super(props);
this.state = {
viewState: 'default',
rotateDegree: 0,
bounceValue: new Animated.Value(1)
};
}
getRotateDegree() {
return this.state.rotateDegree + 'deg';
}
getPointerStyles() {
return styles.gridItemPointerRight;
}
render() {
return (
<Animated.View
style={[
styles.gridItem,
styles[this.state.viewState + 'GridItem']
]}>
<View style={styles.gridItemInner}></View>
</Animated.View>
)
}
}
// GridItem.propTypes = { initialCount: React.PropTypes.string };
// GridItem.defaultProps = {};
module.exports = GridItem;