Skip to content

Instantly share code, notes, and snippets.

@hayanisaid
Created February 21, 2021 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hayanisaid/c3a8d843217f335ab4e74b9e7be7617a to your computer and use it in GitHub Desktop.
Save hayanisaid/c3a8d843217f335ab4e74b9e7be7617a to your computer and use it in GitHub Desktop.
/**
* 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