|
| 1 | +import React from 'react'; |
| 2 | +import Svg, { Rect, Circle, Text as SvgText, G, Path } from 'react-native-svg'; |
| 3 | +import { View, StyleSheet } from 'react-native'; |
| 4 | + |
| 5 | +export const CalendarIllustration: React.FC = () => { |
| 6 | + return ( |
| 7 | + <View style={styles.container}> |
| 8 | + <Svg width="300" height="300" viewBox="0 0 300 300"> |
| 9 | + {/* Calendar Container */} |
| 10 | + <Rect |
| 11 | + x={40} |
| 12 | + y={60} |
| 13 | + width={220} |
| 14 | + height={200} |
| 15 | + rx={16} |
| 16 | + fill="#FFFFFF" |
| 17 | + stroke="#E1E5E9" |
| 18 | + strokeWidth={2} |
| 19 | + /> |
| 20 | + |
| 21 | + {/* Calendar Header */} |
| 22 | + <Rect |
| 23 | + x={40} |
| 24 | + y={60} |
| 25 | + width={220} |
| 26 | + height={45} |
| 27 | + rx={16} |
| 28 | + fill="#F8F9FA" |
| 29 | + /> |
| 30 | + <Rect |
| 31 | + x={40} |
| 32 | + y={85} |
| 33 | + width={220} |
| 34 | + height={20} |
| 35 | + fill="#F8F9FA" |
| 36 | + /> |
| 37 | + |
| 38 | + {/* Month Title */} |
| 39 | + <Rect x={60} y={73} width={80} height={12} rx={6} fill="#000000" opacity={0.8} /> |
| 40 | + |
| 41 | + {/* Day Labels (Mon-Sun) */} |
| 42 | + {[0, 1, 2, 3, 4, 5, 6].map((day) => ( |
| 43 | + <Rect |
| 44 | + key={`day-${day}`} |
| 45 | + x={52 + day * 30} |
| 46 | + y={115} |
| 47 | + width={18} |
| 48 | + height={6} |
| 49 | + rx={3} |
| 50 | + fill="#666666" |
| 51 | + opacity={0.5} |
| 52 | + /> |
| 53 | + ))} |
| 54 | + |
| 55 | + {/* Calendar Grid - Days */} |
| 56 | + {[0, 1, 2, 3, 4].map((row) => |
| 57 | + [0, 1, 2, 3, 4, 5, 6].map((col) => { |
| 58 | + const hasEvent = (row === 1 && col === 2) || (row === 2 && col === 4) || (row === 3 && col === 1); |
| 59 | + const isToday = row === 2 && col === 2; |
| 60 | + |
| 61 | + return ( |
| 62 | + <G key={`day-${row}-${col}`}> |
| 63 | + {isToday && ( |
| 64 | + <Circle |
| 65 | + cx={60 + col * 30} |
| 66 | + cy={143 + row * 28} |
| 67 | + r={12} |
| 68 | + stroke="#007AFF" |
| 69 | + strokeWidth={2} |
| 70 | + fill="none" |
| 71 | + /> |
| 72 | + )} |
| 73 | + <Rect |
| 74 | + x={54 + col * 30} |
| 75 | + y={137 + row * 28} |
| 76 | + width={12} |
| 77 | + height={12} |
| 78 | + rx={2} |
| 79 | + fill={isToday ? "#007AFF" : "#000000"} |
| 80 | + opacity={isToday ? 0.9 : 0.3} |
| 81 | + /> |
| 82 | + {hasEvent && ( |
| 83 | + <Circle |
| 84 | + cx={60 + col * 30} |
| 85 | + cy={155 + row * 28} |
| 86 | + r={3} |
| 87 | + fill="#4CAF50" |
| 88 | + /> |
| 89 | + )} |
| 90 | + </G> |
| 91 | + ); |
| 92 | + }) |
| 93 | + )} |
| 94 | + |
| 95 | + {/* Google Calendar Badge */} |
| 96 | + <G> |
| 97 | + <Circle cx={240} cy={45} r={20} fill="#FFFFFF" stroke="#E1E5E9" strokeWidth={2} /> |
| 98 | + <Rect x={232} y={37} width={16} height={16} rx={3} fill="#4285F4" /> |
| 99 | + <Rect x={234} y={39} width={12} height={4} rx={1} fill="#FFFFFF" /> |
| 100 | + <Rect x={234} y={45} width={7} height={2} rx={1} fill="#FFFFFF" opacity={0.7} /> |
| 101 | + <Rect x={234} y={49} width={9} height={2} rx={1} fill="#FFFFFF" opacity={0.7} /> |
| 102 | + </G> |
| 103 | + |
| 104 | + {/* "Coming Soon" badges */} |
| 105 | + <G opacity={0.5}> |
| 106 | + {/* Outlook badge */} |
| 107 | + <Rect x={185} y={270} width={50} height={20} rx={10} fill="#F8F9FA" stroke="#E1E5E9" strokeWidth={1} /> |
| 108 | + <Rect x={192} y={276} width={36} height={4} rx={2} fill="#666666" opacity={0.5} /> |
| 109 | + <Rect x={192} y={282} width={20} height={3} rx={1.5} fill="#666666" opacity={0.3} /> |
| 110 | + |
| 111 | + {/* Apple Calendar badge */} |
| 112 | + <Rect x={120} y={270} width={55} height={20} rx={10} fill="#F8F9FA" stroke="#E1E5E9" strokeWidth={1} /> |
| 113 | + <Rect x={127} y={276} width={41} height={4} rx={2} fill="#666666" opacity={0.5} /> |
| 114 | + <Rect x={127} y={282} width={25} height={3} rx={1.5} fill="#666666" opacity={0.3} /> |
| 115 | + </G> |
| 116 | + </Svg> |
| 117 | + </View> |
| 118 | + ); |
| 119 | +}; |
| 120 | + |
| 121 | +const styles = StyleSheet.create({ |
| 122 | + container: { |
| 123 | + alignItems: 'center', |
| 124 | + justifyContent: 'center', |
| 125 | + }, |
| 126 | +}); |
0 commit comments