Skip to content

Instantly share code, notes, and snippets.

@WallysonGalvao
Created August 3, 2020 20:29
Show Gist options
  • Save WallysonGalvao/d9eaf25d9266ecac537278128f80656b to your computer and use it in GitHub Desktop.
Save WallysonGalvao/d9eaf25d9266ecac537278128f80656b to your computer and use it in GitHub Desktop.
Solar System
import { StatusBar } from "expo-status-bar";
import React from "react";
import { StyleSheet, Text, View } from "react-native";
import { AppLoading } from "expo";
import {
useFonts,
Roboto_400Regular,
Roboto_700Bold,
} from "@expo-google-fonts/roboto";
export default function App() {
// Carregamentos das fontes
const [fontsLoaded] = useFonts({ Roboto_400Regular, Roboto_700Bold });
// Caso nossas fontes ainda não tenham sido carregadas é mostrada uma tela
// de loading
if (!fontsLoaded) return <AppLoading />;
return (
<View style={styles.container}>
{/* Adicionamos o styles ao componente Text */}
<Text style={styles.text}>
Open up App.tsx to start working on your app!
</Text>
<StatusBar style="auto" />
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
text: {
fontFamily: "Roboto_700Bold",
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment