Last active
August 22, 2021 10:46
-
-
Save YajanaRao/c89b80c6fd03d4ac2f5294058957d574 to your computer and use it in GitHub Desktop.
Import ThemeProvider at the top of your React component tree
This file contains hidden or 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 * as React from 'react'; | |
import Constants from 'expo-constants'; | |
import { ThemeProvider } from '@shopify/restyle'; | |
// You can import from local files | |
import theme from './theme'; | |
import AssetExample from './components/AssetExample'; | |
import Box from './components/Box'; | |
import Text from './components/Text'; | |
export default function App() { | |
return ( | |
<ThemeProvider theme={theme}> | |
<Box | |
flex={1} | |
justifyContent="center" | |
backgroundColor="mainBackground" | |
padding="s"> | |
<Text variant="header" textAlign="center"> | |
Hello world | |
</Text> | |
<Text variant="paragraph"> | |
Change code in the editor and watch it change on your phone! Save to | |
get a shareable url. | |
</Text> | |
<AssetExample /> | |
</Box> | |
</ThemeProvider> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment