mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-02-09 10:20:16 +01:00
Ajout traque-app
This commit is contained in:
38
traque-app/components/button.js
Normal file
38
traque-app/components/button.js
Normal file
@@ -0,0 +1,38 @@
|
||||
import { forwardRef } from 'react';
|
||||
import { TouchableHighlight, View, Text, StyleSheet } from "react-native";
|
||||
|
||||
export default CustomButton = forwardRef(function CustomButton({ label, onPress }, ref) {
|
||||
return (
|
||||
<View style={styles.buttonContainer}>
|
||||
<TouchableHighlight style={styles.button} onPress={onPress} ref={ref}>
|
||||
<Text style={styles.buttonLabel}>{label}</Text>
|
||||
</TouchableHighlight>
|
||||
</View>
|
||||
);
|
||||
});
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
buttonContainer: {
|
||||
width: "100%",
|
||||
maxWidth: 240,
|
||||
height: 80,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
padding: 3,
|
||||
borderWidth: 4,
|
||||
borderColor: '#888',
|
||||
borderRadius: 18
|
||||
},
|
||||
button: {
|
||||
borderRadius: 10,
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
backgroundColor: '#555'
|
||||
},
|
||||
buttonLabel: {
|
||||
color: '#fff',
|
||||
fontSize: 16,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user