Last active
June 19, 2020 20:06
-
-
Save WallysonGalvao/46e8660b5565c2a87287d24783282614 to your computer and use it in GitHub Desktop.
Marvelapp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { StyleSheet, Text, View } from "react-native"; | |
import { AppLoading } from "expo"; | |
import { useFonts } from "@use-expo/font"; | |
// Importação do arquivo .svg | |
import Hero from "./src/assets/icons/hero.svg"; | |
export default function App() { | |
const [fontsLoaded] = useFonts({ | |
"gilroy-bold": require("./assets/fonts/gilroy-bold.ttf"), | |
"gilroy-heavy": require("./assets/fonts/gilroy-heavy.ttf"), | |
"gilroy-medium": require("./assets/fonts/gilroy-medium.ttf"), | |
"gilroy-regular": require("./assets/fonts/gilroy-regular.ttf"), | |
"gilroy-semibold": require("./assets/fonts/gilroy-semibold.ttf"), | |
}); | |
if (!fontsLoaded) return <AppLoading />; | |
return ( | |
<View style={styles.container}> | |
{/* Adicionamos a imagem ao centro da página */} | |
<Hero width={100} height={100} /> | |
</View> | |
); | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
backgroundColor: "#fff", | |
alignItems: "center", | |
justifyContent: "center", | |
}, | |
text: { | |
fontFamily: "gilroy-semibold", | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment