Files
traque/mobile/traque-app/src/components/common/IconButton.jsx
2026-02-20 23:23:42 +01:00

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%",
},
});