Skip to content

Commit

Permalink
(App) remove eslint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Spoutnik97 committed Nov 19, 2020
1 parent 04b0694 commit fdae8ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
1 change: 0 additions & 1 deletion .eslintrc
Expand Up @@ -11,7 +11,6 @@
"react-native/no-unused-styles": 2,
"react-native/split-platform-components": 2,
"react-native/no-inline-styles": 2,
"react-native/no-color-literals": 2,
"react/prop-types": 0
},
"env": {
Expand Down
18 changes: 14 additions & 4 deletions example/App.tsx
@@ -1,5 +1,5 @@
import React from 'react';
import { Text, TouchableOpacity, View } from 'react-native';
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';

import { ImageHeaderScrollView, TriggeringView } from 'react-native-image-header-scroll-view';

Expand All @@ -10,18 +10,28 @@ export default function App() {
minHeight={100}
headerImage={require('./assets/NZ.jpg')}
renderForeground={() => (
<View style={{ height: 150, justifyContent: 'center', alignItems: 'center' }}>
<View style={styles.foregroundContainer}>
<TouchableOpacity onPress={() => console.log('tap!!')}>
<Text style={{ backgroundColor: 'transparent' }}>Tap Me!</Text>
<Text style={styles.header}>Tap Me!</Text>
</TouchableOpacity>
</View>
)}
>
<View style={{ height: 1000 }}>
<View style={styles.content}>
<TriggeringView onHide={() => console.log('text hidden')}>
<Text>Scroll Me!</Text>
</TriggeringView>
</View>
</ImageHeaderScrollView>
);
}

const styles = StyleSheet.create({
foregroundContainer: {
height: 200,
justifyContent: 'center',
alignItems: 'center',
},
header: { backgroundColor: 'transparent' },
content: { height: 1000 },
});

0 comments on commit fdae8ea

Please sign in to comment.