Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Commit

Permalink
apply breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
benevbright committed Oct 18, 2020
1 parent ca1595d commit 14f7b39
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 37 deletions.
77 changes: 41 additions & 36 deletions example/src/BigHeaderScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,47 +21,52 @@ const BigHeaderScreen = ({ navigation }: ScreenProps) => {
containerPaddingTop,
scrollIndicatorInsetTop,
} = useCollapsibleBigHeader({
headerStyle: {
height: 250,
},
headerBackground: (
<>
<Image
source={{
uri:
'https://artwork.wallartprints.com/media/catalog/category/mountain-pictures.jpg',
}}
style={{ flex: 1 }}
/>
<View
style={{
position: 'absolute',
width: '100%',
alignItems: 'center',
top: 80,
}}>
navigationOptions: {
title: 'John Doe',
headerStyle: {
height: 250,
},
headerBackground: (
<>
<Image
source={{
uri:
'https://media.istockphoto.com/vectors/default-profile-picture-avatar-photo-placeholder-vector-illustration-vector-id1223671392?b=1&k=6&m=1223671392&s=612x612&w=0&h=5VMcL3a_1Ni5rRHX0LkaA25lD_0vkhFsb1iVm1HKVSQ=',
}}
style={{
width: 100,
height: 100,
borderColor: 'lightgray',
borderWidth: 6,
borderRadius: 50,
'https://artwork.wallartprints.com/media/catalog/category/mountain-pictures.jpg',
}}
style={{ flex: 1 }}
/>
<TouchableOpacity>
<Text style={{ fontSize: 20, color: 'white', marginTop: 16 }}>
Edit Profile
</Text>
</TouchableOpacity>
</View>
</>
),
collapsedColor: 'white',
<View
style={{
position: 'absolute',
width: '100%',
alignItems: 'center',
top: 80,
}}>
<Image
source={{
uri:
'https://media.istockphoto.com/vectors/default-profile-picture-avatar-photo-placeholder-vector-illustration-vector-id1223671392?b=1&k=6&m=1223671392&s=612x612&w=0&h=5VMcL3a_1Ni5rRHX0LkaA25lD_0vkhFsb1iVm1HKVSQ=',
}}
style={{
width: 100,
height: 100,
borderColor: 'lightgray',
borderWidth: 6,
borderRadius: 50,
}}
/>
<TouchableOpacity>
<Text style={{ fontSize: 20, color: 'white', marginTop: 16 }}>
Edit Profile
</Text>
</TouchableOpacity>
</View>
</>
),
},
config: {
collapsedColor: 'white',
},
});

return (
Expand Down
1 change: 0 additions & 1 deletion src/core.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
NativeScrollEvent,
useWindowDimensions,
} from 'react-native';
import { StackHeaderProps } from '@react-navigation/stack';
import { useRoute, useNavigation } from '@react-navigation/native';
import shallowequal from 'shallowequal';

Expand Down

0 comments on commit 14f7b39

Please sign in to comment.