Skip to content

Rizculla/rn-assignment2-ID-11296671

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

My React Native App

This is a simple React Native application that I developed as part of a task to display a text message with specific styles.

Description

In this project, I made the following modifications to the App.js file:

  • Changed the background color of the View component.
  • Edited the Text component to display "My name is Benson Otti".
  • Increased the font size of the text to 24.
  • Made the name "Benson Otti" bold.

Screenshot

Screenshot 2024-05-26 194420.png

Student ID

My Student ID: 11296671

How to Run the Project

  1. Clone this repository:
    git clone https://github.com/Rizculla/rn-assignment2-ID-11296671.git
  2. Navigate to the project directory:
    cd rn-assignment2-ID-11296671
  3. Install the dependencies:
    npm install
  4. Run the project:
    npm start

App.js Code

Here is the code for the App.js file:

import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';

export default function App() {
  return (
    <View style={styles.container}>
      <Text style={styles.text}>
        My name is <Text style={styles.boldText}>Benson Otti</Text>
      </Text>
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#f0f8ff', // Changed the background color
    alignItems: 'center',
    justifyContent: 'center',
  },
  text: {
    fontSize: 24, // Increased the font size
  },
  boldText: {
    fontWeight: 'bold',
  },
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published