File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import ExampleComponent from './Shared/ExampleComponent'
77import { ExampleComponentType } from './types'
88
99const title = 'Stretchable Header'
10+ const HEADER_HEIGHT = 250
1011
1112export const Header = ( ) => {
1213 const { top } = useHeaderMeasurements ( )
@@ -18,7 +19,7 @@ export const Header = () => {
1819 translateY : Math . min ( 0 , - top . value / 2 ) ,
1920 } ,
2021 {
21- scale : Math . max ( 1 , ( 250 + top . value ) / 250 ) ,
22+ scale : Math . max ( 1 , ( HEADER_HEIGHT + top . value ) / HEADER_HEIGHT ) ,
2223 } ,
2324 ] ,
2425 }
@@ -44,7 +45,7 @@ const styles = StyleSheet.create({
4445 root : {
4546 justifyContent : 'center' ,
4647 alignItems : 'center' ,
47- height : 250 ,
48+ height : HEADER_HEIGHT ,
4849 } ,
4950 background : {
5051 position : 'absolute' ,
You can’t perform that action at this time.
0 commit comments