68 lines
1.5 KiB
JavaScript
68 lines
1.5 KiB
JavaScript
import React from 'react';
|
|
import { View, Text, StyleSheet, Image, TouchableOpacity } from 'react-native';
|
|
|
|
const CallToActionCard = ({ image, title, description, buttonLabel, onPress }) => {
|
|
return (
|
|
<View style={styles.card}>
|
|
<Image source={image} style={styles.image} resizeMode="contain" />
|
|
|
|
<View style={styles.textContainer}>
|
|
<Text style={styles.title}>{title}</Text>
|
|
<Text style={styles.description}>{description}</Text>
|
|
|
|
<TouchableOpacity style={styles.button} onPress={onPress}>
|
|
<Text style={styles.buttonText}>{buttonLabel}</Text>
|
|
</TouchableOpacity>
|
|
</View>
|
|
</View>
|
|
);
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
card: {
|
|
flexDirection: 'row',
|
|
backgroundColor: '#dee',
|
|
borderRadius: 16,
|
|
padding: 12,
|
|
margin: 16,
|
|
alignItems: 'center',
|
|
elevation: 3,
|
|
shadowColor: '#000',
|
|
shadowOpacity: 0.1,
|
|
shadowRadius: 5,
|
|
},
|
|
image: {
|
|
width: 80,
|
|
height: 80,
|
|
marginRight: 12,
|
|
borderRadius: 12,
|
|
},
|
|
textContainer: {
|
|
flex: 1,
|
|
},
|
|
title: {
|
|
fontSize: 16,
|
|
fontWeight: 'bold',
|
|
marginBottom: 4,
|
|
},
|
|
description: {
|
|
fontSize: 13,
|
|
color: '#666',
|
|
marginBottom: 8,
|
|
},
|
|
button: {
|
|
alignSelf: 'flex-start',
|
|
backgroundColor: '#2e86de',
|
|
borderRadius: 8,
|
|
paddingVertical: 6,
|
|
paddingHorizontal: 16,
|
|
},
|
|
buttonText: {
|
|
color: '#fff',
|
|
fontSize: 13,
|
|
fontWeight: '600',
|
|
},
|
|
});
|
|
|
|
export default CallToActionCard;
|