mirror of
https://git.rezel.net/LudoTech/traque.git
synced 2026-04-10 16:30:18 +02:00
24 lines
588 B
JavaScript
24 lines
588 B
JavaScript
// 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%",
|
|
},
|
|
});
|