Untitled

 avatar
user_9363972
javascript
5 months ago
874 B
5
Indexable
import { StatusBar } from "expo-status-bar";
import React from "react";
import { Alert, Button, Image, StyleSheet, Text, View } from "react-native";

export default function index() {
  const openAlert = () => {
    alert("Hello you clicked the button !");
  };
  return (
    <View style={styles.container}>
      <Text style={{ color: "white" }}> Hello World</Text>
      <Image
        style={{
          width: 50,
          height: 50,
        }}
        source={require("../assets/images/icon.png")}
      />
      <Button
        title="Click Me !"
        onPress={() => {
          openAlert();
        }}
      />
      <StatusBar style="auto" />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "#25292e",
    alignItems: "center",
    justifyContent: "center",
  },
});
Leave a Comment