File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 1111 "react-native/no-unused-styles": 2,
1212 "react-native/split-platform-components": 2,
1313 "react-native/no-inline-styles": 2,
14- "react-native/no-color-literals": 2,
1514 "react/prop-types": 0
1615 },
1716 "env": {
Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import { Text , TouchableOpacity , View } from 'react-native' ;
2+ import { StyleSheet , Text , TouchableOpacity , View } from 'react-native' ;
33
44import { ImageHeaderScrollView , TriggeringView } from 'react-native-image-header-scroll-view' ;
55
@@ -10,18 +10,28 @@ export default function App() {
1010 minHeight = { 100 }
1111 headerImage = { require ( './assets/NZ.jpg' ) }
1212 renderForeground = { ( ) => (
13- < View style = { { height : 150 , justifyContent : 'center' , alignItems : 'center' } } >
13+ < View style = { styles . foregroundContainer } >
1414 < TouchableOpacity onPress = { ( ) => console . log ( 'tap!!' ) } >
15- < Text style = { { backgroundColor : 'transparent' } } > Tap Me!</ Text >
15+ < Text style = { styles . header } > Tap Me!</ Text >
1616 </ TouchableOpacity >
1717 </ View >
1818 ) }
1919 >
20- < View style = { { height : 1000 } } >
20+ < View style = { styles . content } >
2121 < TriggeringView onHide = { ( ) => console . log ( 'text hidden' ) } >
2222 < Text > Scroll Me!</ Text >
2323 </ TriggeringView >
2424 </ View >
2525 </ ImageHeaderScrollView >
2626 ) ;
2727}
28+
29+ const styles = StyleSheet . create ( {
30+ foregroundContainer : {
31+ height : 200 ,
32+ justifyContent : 'center' ,
33+ alignItems : 'center' ,
34+ } ,
35+ header : { backgroundColor : 'transparent' } ,
36+ content : { height : 1000 } ,
37+ } ) ;
You can’t perform that action at this time.
0 commit comments