forked from codeherence/react-native-header
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLargeHeader.tsx
More file actions
29 lines (25 loc) · 810 Bytes
/
LargeHeader.tsx
File metadata and controls
29 lines (25 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React from 'react';
import { StyleSheet } from 'react-native';
import Animated from 'react-native-reanimated';
import type { LargeHeaderProps } from './types';
const LH_VERTICAL_PADDING = 6;
const LH_HORIZONTAL_PADDING = 12;
/**
* A convenience component to wrap your large header content with.
*
* @param {LargeHeaderProps} props
*/
const LargeHeader: React.FC<React.PropsWithChildren<LargeHeaderProps>> = ({
headerStyle,
children,
}) => <Animated.View style={[styles.headerContainer, headerStyle]}>{children}</Animated.View>;
export default LargeHeader;
const styles = StyleSheet.create({
headerContainer: {
width: '100%',
flexDirection: 'row',
justifyContent: 'space-between',
paddingVertical: LH_VERTICAL_PADDING,
paddingHorizontal: LH_HORIZONTAL_PADDING,
},
});