-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuttonText.js
38 lines (35 loc) · 960 Bytes
/
buttonText.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, { useState } from 'react';
import {
StyleSheet,
View,
Text,
TouchableOpacity,
} from 'react-native';
import * as Haptics from 'expo-haptics';
import Constants from 'expo-constants'
import CustomText from './CustomText';
import ThemeChooser from './themeChooser';
export const ButtonText = ({text, callback}) => (
<View style={styles.container}>
<TouchableOpacity onPress={() => {
callback()
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Medium)
}}>
<CustomText style={styles.backTxt}>
{text}
</CustomText>
</TouchableOpacity>
</View>
);
const styles = StyleSheet.create({
container: {
// position: 'absolute',
// bottom: Constants.statusBarHeight + 50,
alignContent: 'center',
justifyContent: 'center',
},
backTxt: {
fontSize: 30,
fontFamily: 'Billy-Light',
},
});