-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
36 lines (33 loc) · 755 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import {StatusBar} from 'expo-status-bar';
import React from 'react';
import {Text, View} from 'react-native';
import {screenWidthMin, useStyleQueries} from 'react-native-style-queries';
export default function App() {
const styles = useStyleQueries(styleConfig);
return (
<View style={styles.container}>
<Text style={styles.text}>Red on small phones, blue on big phones.</Text>
<StatusBar style="auto" />
</View>
);
}
const styleConfig = {
container: [
{
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
],
text: [
{
fontSize: 12,
color: 'red',
},
screenWidthMin(375, {
fontSize: 18,
color: 'blue',
}),
],
};