|
| 1 | +import React from 'react'; |
| 2 | +import { SafeAreaView, Text, StyleSheet, View, Button } from 'react-native'; |
| 3 | + |
| 4 | +interface WelcomeScreenProps { |
| 5 | + onNext: () => void; |
| 6 | +} |
| 7 | + |
| 8 | +/** |
| 9 | + * WelcomeScreen component displays a welcome message and an overview of the Open-O-Connect app's features. |
| 10 | + * |
| 11 | + * @component |
| 12 | + * @param {WelcomeScreenProps} props - The props for the WelcomeScreen component. |
| 13 | + * @param {function} props.onNext - Callback function to be called when the "Next" button is pressed. |
| 14 | + * |
| 15 | + * @returns {JSX.Element} The rendered WelcomeScreen component. |
| 16 | + * |
| 17 | + * @example |
| 18 | + * <WelcomeScreen onNext={handleNext} /> |
| 19 | + * |
| 20 | + * @remarks |
| 21 | + * This screen provides an introduction to the app and lists the main features available to the user. |
| 22 | + * It also includes a note about the info button available on each screen for additional help. |
| 23 | + */ |
| 24 | +const WelcomeScreen: React.FC<WelcomeScreenProps> = ({ onNext }) => { |
| 25 | + return ( |
| 26 | + <SafeAreaView style={styles.container}> |
| 27 | + <Text style={styles.title}>Welcome to Open-O-Connect</Text> |
| 28 | + <Text style={styles.description}> |
| 29 | + Open-O-Connect is a mobile app that integrates with O19, making it |
| 30 | + easier for users to access O19's functions on their cell phones. Our |
| 31 | + current features include: |
| 32 | + </Text> |
| 33 | + <View style={styles.featuresList}> |
| 34 | + <Text style={styles.feature}>1. View today's appointments</Text> |
| 35 | + <Text style={styles.feature}> |
| 36 | + 2. Access patient information and their appointment history |
| 37 | + </Text> |
| 38 | + <Text style={styles.feature}> |
| 39 | + 3. Upload pictures to patient demographics |
| 40 | + </Text> |
| 41 | + </View> |
| 42 | + <Text style={styles.note}> |
| 43 | + On each screen, there is an info button in the top right corner. Use |
| 44 | + this button to get information about the current screen's functionality. |
| 45 | + </Text> |
| 46 | + <View style={styles.buttonContainer}> |
| 47 | + <Button title="Next" onPress={onNext} /> |
| 48 | + </View> |
| 49 | + </SafeAreaView> |
| 50 | + ); |
| 51 | +}; |
| 52 | + |
| 53 | +const styles = StyleSheet.create({ |
| 54 | + container: { |
| 55 | + flex: 1, |
| 56 | + justifyContent: 'center', |
| 57 | + alignItems: 'center', |
| 58 | + padding: 30, |
| 59 | + backgroundColor: '#f5f5f5', |
| 60 | + }, |
| 61 | + title: { |
| 62 | + fontSize: 26, |
| 63 | + fontWeight: 'bold', |
| 64 | + marginBottom: 20, |
| 65 | + color: '#333', |
| 66 | + }, |
| 67 | + subtitle: { |
| 68 | + fontSize: 16, |
| 69 | + color: '#6c757d', |
| 70 | + marginBottom: 20, |
| 71 | + }, |
| 72 | + description: { |
| 73 | + fontSize: 16, |
| 74 | + color: '#333', |
| 75 | + marginBottom: 20, |
| 76 | + lineHeight: 22, |
| 77 | + }, |
| 78 | + featuresList: { |
| 79 | + alignItems: 'flex-start', |
| 80 | + marginBottom: 20, |
| 81 | + }, |
| 82 | + feature: { |
| 83 | + fontSize: 16, |
| 84 | + color: '#333', |
| 85 | + marginBottom: 10, |
| 86 | + }, |
| 87 | + note: { |
| 88 | + fontSize: 14, |
| 89 | + color: '#6c757d', |
| 90 | + marginBottom: 20, |
| 91 | + lineHeight: 20, |
| 92 | + }, |
| 93 | + buttonContainer: { |
| 94 | + width: '100%', |
| 95 | + paddingHorizontal: 40, |
| 96 | + }, |
| 97 | +}); |
| 98 | + |
| 99 | +export default WelcomeScreen; |
0 commit comments