forked from KevinHu2014/RN-IceSpeed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvibrate.js
37 lines (36 loc) · 754 Bytes
/
vibrate.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
import React, { Component } from 'react';
import {
StyleSheet,
View,
Text,
TouchableHighlight,
Vibration,
} from 'react-native';
//exports.framework = 'React';
//exports.title = 'Vibration';
//exports.description = 'Vibration API';
var vibrate = React.createClass({
title: 'Vibration.vibrate()',
render() {
return (
<TouchableHighlight
style={styles.wrapper}
onPress={() => Vibration.vibrate()}>
<View style={styles.button}>
<Text>Vibrate</Text>
</View>
</TouchableHighlight>
);
}
});
var styles = StyleSheet.create({
wrapper: {
borderRadius: 5,
marginBottom: 5,
},
button: {
backgroundColor: '#eeeeee',
padding: 10,
},
});
module.exports = vibrate;