Merge pull request 'the desing for the button is finished' (#4) from WORK-RHA into master
Reviewed-on: #4pull/9/head
commit
0902b66882
@ -1,33 +1,43 @@
|
||||
import React from 'react';
|
||||
import {StyleSheet,Pressable, Text, Image} from 'react-native';
|
||||
import {StyleSheet,Pressable, Text, View} from 'react-native';
|
||||
|
||||
|
||||
export default function CustomButton(props) {
|
||||
return (
|
||||
<Pressable style={styles.button} >
|
||||
<Text style={styles.text}>{props.title}</Text>
|
||||
return (
|
||||
<Pressable style={styles.button}>
|
||||
<View style={styles.view}>
|
||||
<Text style={styles.text}>{props.title}</Text>
|
||||
</View>
|
||||
</Pressable>
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
paddingVertical: 12,
|
||||
paddingHorizontal: 32,
|
||||
width : 150,
|
||||
height: 40,
|
||||
borderRadius: 4,
|
||||
elevation: 3,
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.7)',
|
||||
},
|
||||
text: {
|
||||
width: '100%', // L'image prend toute la largeur du conteneur
|
||||
height: '100%',
|
||||
fontSize: 16,
|
||||
fontSize: 15,
|
||||
lineHeight: 21,
|
||||
fontWeight: 'bold',
|
||||
letterSpacing: 0.25,
|
||||
color: 'white',
|
||||
},
|
||||
view: {
|
||||
width : 145,
|
||||
height: 35,
|
||||
borderRadius: 4,
|
||||
elevation: 3,
|
||||
borderWidth: 1,
|
||||
borderColor: 'grey',
|
||||
alignItems: 'center', // Centre le contenu verticalement
|
||||
justifyContent: 'center', // Centre le contenu horizontalement
|
||||
},
|
||||
});
|
||||
|
||||
|
Loading…
Reference in new issue