@@ -14,15 +14,14 @@ import RNGalleryList from './RNGalleryList';
14
14
import { ScreenWrapper } from './components/ScreenWrapper' ;
15
15
import { TileGallery } from './components/TileGallery' ;
16
16
import { ListOfComponents } from './ComponentListPage' ;
17
- import { Svg , Defs , Stop , Rect , LinearGradient } from 'react-native-svg' ;
18
17
import useHighContrastState from './hooks/useHighContrastState' ;
19
18
20
19
const createStyles = ( ) =>
21
20
StyleSheet . create ( {
22
21
container : {
23
22
padding : 10 ,
24
23
paddingBottom : 40 ,
25
- paddingLeft : 36 ,
24
+ paddingStart : 36 ,
26
25
alignSelf : 'stretch' ,
27
26
height : '100%' ,
28
27
alignContent : 'flex-start' ,
@@ -44,7 +43,8 @@ const createStyles = () =>
44
43
} ,
45
44
pageHeader : { } ,
46
45
pageTitleContainer : {
47
- height : 204 ,
46
+ // height: 204,
47
+ height : 76 ,
48
48
justifyContent : 'center' ,
49
49
} ,
50
50
pageTitle : {
@@ -56,6 +56,18 @@ const createStyles = () =>
56
56
} ,
57
57
} ) ;
58
58
59
+ const appleTypography = StyleSheet . create ( {
60
+ largeTitle : {
61
+ fontSize : 26 ,
62
+ lineHeight : 32 ,
63
+ } ,
64
+ largeTitleEmphasized : {
65
+ fontSize : 26 ,
66
+ lineHeight : 32 ,
67
+ fontWeight : 'bold' ,
68
+ } ,
69
+ } ) ;
70
+
59
71
interface BackgroundGradientProps {
60
72
colorStop1 : ColorValue ;
61
73
colorStop2 : ColorValue ;
@@ -81,33 +93,24 @@ const PageTitle = () => {
81
93
return (
82
94
// https://github.com/microsoft/WinUI-Gallery/blob/c3cf8db5607c71f5df51fd4eb45d0ce6e932d338/WinUIGallery/Controls/HomePageHeaderImage.xaml#L19
83
95
< View style = { styles . heroGradient } >
84
- { /* <Svg height="100%" width="100%" style={StyleSheet.absoluteFillObject}>
85
- <Defs>
86
- <LinearGradient id="grad" x1={0.5} y1={0} x2={0.5} y2={1}>
87
- <Stop offset="0" stopColor={colorStops[0]} />
88
- <Stop offset="1" stopColor={colorStops[1]} />
89
- </LinearGradient>
90
- </Defs>
91
- <Rect width="100%" height="100%" fill="url(#grad)" />
92
- </Svg> */ }
93
- < Image
96
+ { /* <Image
94
97
source={require('../assets/GalleryHeaderImage.png')}
95
98
style={[
96
99
styles.heroBackgroundImage,
97
100
{
98
101
opacity: colorScheme === 'light' ? 0.9 : 0.8,
99
102
aspectRatio: 1,
100
- height : 450 ,
103
+ height: 330 ,
101
104
// margin: 20,
102
105
},
103
106
]}
104
- />
107
+ /> */ }
105
108
< View style = { styles . pageHeader } >
106
109
< View style = { styles . pageTitleContainer } >
107
110
< Text
108
111
accessible
109
112
accessibilityRole = { 'header' }
110
- style = { styles . pageTitle } >
113
+ style = { [ styles . pageTitle , appleTypography . largeTitle ] } >
111
114
React Native Gallery
112
115
</ Text >
113
116
</ View >
@@ -117,9 +120,10 @@ const PageTitle = () => {
117
120
) ;
118
121
} ;
119
122
120
- export const HomePage : React . FunctionComponent < { } > = ( { navigation} ) => {
121
- const { colors} = useTheme ( ) ;
122
- const styles = createStyles ( colors ) ;
123
+ export const HomePage : React . FunctionComponent < { navigation : any } > = ( {
124
+ navigation,
125
+ } ) => {
126
+ const styles = createStyles ( ) ;
123
127
const isScreenFocused = useIsFocused ( ) ;
124
128
125
129
return isScreenFocused ? (
0 commit comments