We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61bb46f commit f480900Copy full SHA for f480900
1 file changed
example/src/StretchableHeader.tsx
@@ -7,6 +7,7 @@ import ExampleComponent from './Shared/ExampleComponent'
7
import { ExampleComponentType } from './types'
8
9
const title = 'Stretchable Header'
10
+const HEADER_HEIGHT = 250
11
12
export const Header = () => {
13
const { top } = useHeaderMeasurements()
@@ -18,7 +19,7 @@ export const Header = () => {
18
19
translateY: Math.min(0, -top.value / 2),
20
},
21
{
- scale: Math.max(1, (250 + top.value) / 250),
22
+ scale: Math.max(1, (HEADER_HEIGHT + top.value) / HEADER_HEIGHT),
23
24
],
25
}
@@ -46,7 +47,7 @@ const styles = StyleSheet.create({
46
47
root: {
48
justifyContent: 'center',
49
alignItems: 'center',
- height: 250,
50
+ height: HEADER_HEIGHT,
51
52
background: {
53
position: 'absolute',
0 commit comments