import React from 'react'; import { View, StyleSheet, Pressable, Dimensions, useWindowDimensions } from 'react-native'; import { LinearGradient } from 'expo-linear-gradient'; import Text from '../atoms/Text'; import { useDebugBorders } from '../../hooks/useDebugBorders'; import Icon from '../atoms/Icon'; interface CreateStoryCardProps { onPress: () => void; width?: number; height?: number; } const ASPECT_RATIO = 1.5; // 3:2 aspect ratio (height = width * 1.5) const DEFAULT_WIDTH = 240; // Default width if none provided const CreateStoryCard: React.FC = ({ onPress, width = DEFAULT_WIDTH, height, }) => { const containerDebug = useDebugBorders('#FF0000'); const gradientDebug = useDebugBorders('#00FF00'); const contentDebug = useDebugBorders('#0000FF'); const iconDebug = useDebugBorders('#FF00FF'); const cardHeight = height || width * ASPECT_RATIO; const { width: windowWidth } = useWindowDimensions(); const isTablet = windowWidth >= 768; // Responsive font sizes const titleFontSize = isTablet ? 30 : 20; const titleLineHeight = isTablet ? 36 : 26; const dynamicStyles = StyleSheet.create({ container: { width, height: cardHeight, backgroundColor: '#2C2C2C', borderRadius: 12, overflow: 'hidden', shadowColor: '#000', shadowOffset: { width: 4, height: 4, }, shadowOpacity: 0.3, shadowRadius: 5, elevation: 8, }, pressed: { opacity: 0.7, }, }); return ( [dynamicStyles.container, pressed && dynamicStyles.pressed]} > Neue Geschichte erstellen ); }; const styles = StyleSheet.create({ gradient: { flex: 1, justifyContent: 'center', alignItems: 'center', }, content: { alignItems: 'center', padding: 16, }, title: { marginTop: 16, textAlign: 'center', fontWeight: 'bold', letterSpacing: 0.3, }, }); export default CreateStoryCard;