Created
February 21, 2021 19:14
-
-
Save hayanisaid/c3a8d843217f335ab4e74b9e7be7617a to your computer and use it in GitHub Desktop.
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
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* | |
* @format | |
* @flow strict-local | |
*/ | |
import React from 'react'; | |
import { | |
SafeAreaView, | |
StyleSheet, | |
ScrollView, | |
View, | |
Text, | |
StatusBar, | |
} from 'react-native'; | |
import EStyleSheet from 'react-native-extended-stylesheet'; | |
// This file is for a reusable grouping of Theme items. | |
// Similar to an XML fragment layout in Android | |
EStyleSheet.build({ | |
/* Smartphones (portrait and landscape) ----------- */ | |
$primary: '#301551', | |
$green:"green", | |
$white:'#fff', | |
$black:"#000", | |
$gray:"#ccc" | |
}); | |
const App: () => React$Node = () => { | |
return ( | |
<> | |
<View style={styles.container}> | |
<StatusBar barStyle="dark-content" /> | |
<SafeAreaView> | |
<ScrollView> | |
<Text>EStyleSheet </Text> | |
</ScrollView> | |
</SafeAreaView> | |
</View> | |
</> | |
); | |
}; | |
const styles = EStyleSheet.create({ | |
container: { | |
width: '100%', | |
backgroundColor: EStyleSheet.value('$primary'), | |
height: '100%', | |
/** IPad */ | |
'@media (min-width : 768px) and (max-width : 1024px) ': { | |
backgroundColor: '#ed8a0a', | |
}, | |
}, | |
}); | |
export default App; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment