mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-04-11 00:30:19 +02:00
Traduction + alias + routing + refactoring
This commit is contained in:
23
mobile/traque-app/src/components/common/IconButton.jsx
Normal file
23
mobile/traque-app/src/components/common/IconButton.jsx
Normal file
@@ -0,0 +1,23 @@
|
||||
// React
|
||||
import { TouchableOpacity, Image, StyleSheet } from 'react-native';
|
||||
|
||||
export const IconButton = ({ style = {}, source, onPress = () => {} }) => {
|
||||
return (
|
||||
<TouchableOpacity style={[styles.button, style]} onPress={onPress}>
|
||||
<Image source={source} style={styles.icon} resizeMode="contain" />
|
||||
</TouchableOpacity>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
width: 50,
|
||||
height: 50,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
icon: {
|
||||
width: "80%",
|
||||
height: "80%",
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user