-
Notifications
You must be signed in to change notification settings - Fork 108
/
IntegrationsScreen.js
74 lines (68 loc) · 1.92 KB
/
IntegrationsScreen.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import React from "react";
import { StyleSheet, View, ScrollView, Text, StatusBar } from "react-native";
import { iOSColors, human } from "react-native-typography";
import styled from "styled-components";
import glamorous from "glamorous-native";
const { Text: GlamorousBuiltInText } = glamorous;
// See https://github.com/styled-components/styled-components/issues/1449#issuecomment-420087359
const StyledText = styled(props => <Text {...props} />)`
${human.headlineObject};
color: ${iOSColors.red};
margin-top: 8;
`;
const GlamorousTextFromFactory = glamorous.text(human.headline, {
color: iOSColors.green,
marginTop: 8
});
const IntegrationsScreen = () => {
return (
<View style={styles.screenContainer}>
<StatusBar barStyle="dark-content" />
<ScrollView contentContainerStyle={styles.screenContent}>
<Text style={[human.headline, styles.colorOrange]}>
Stylesheet array
</Text>
<Text style={styles.styleSheetSpread}>Stylesheet spread</Text>
<StyledText>StyledComponents</StyledText>
<GlamorousTextFromFactory>
Glamorous from factory
</GlamorousTextFromFactory>
<GlamorousBuiltInText
color={iOSColors.tealBlue}
marginTop={8}
style={human.headline}
>
Glamorous built-in
</GlamorousBuiltInText>
</ScrollView>
</View>
);
};
const styles = StyleSheet.create({
screenContainer: {
flex: 1,
backgroundColor: iOSColors.white
},
screenContent: {
paddingHorizontal: 16,
paddingVertical: 32,
alignItems: "flex-start",
justifyContent: "flex-start"
},
guidesStyle: {
marginBottom: 1,
backgroundColor: iOSColors.customGray
},
noGuidesStyle: {
marginBottom: 1
},
colorOrange: {
color: iOSColors.orange
},
styleSheetSpread: {
...human.headlineObject,
color: iOSColors.yellow,
marginTop: 8
}
});
export default IntegrationsScreen;