mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
at rnw 52 lines 1.2 kB view raw
1/** 2 * Copyright (c) JOB TODAY S.A. and its affiliates. 3 * 4 * This source code is licensed under the MIT license found in the 5 * LICENSE file in the root directory of this source tree. 6 * 7 */ 8 9import React from 'react' 10import {SafeAreaView, Text, TouchableOpacity, StyleSheet} from 'react-native' 11 12type Props = { 13 onRequestClose: () => void 14} 15 16const HIT_SLOP = {top: 16, left: 16, bottom: 16, right: 16} 17 18const ImageDefaultHeader = ({onRequestClose}: Props) => ( 19 <SafeAreaView style={styles.root}> 20 <TouchableOpacity 21 style={styles.closeButton} 22 onPress={onRequestClose} 23 hitSlop={HIT_SLOP}> 24 <Text style={styles.closeText}></Text> 25 </TouchableOpacity> 26 </SafeAreaView> 27) 28 29const styles = StyleSheet.create({ 30 root: { 31 alignItems: 'flex-end', 32 }, 33 closeButton: { 34 marginRight: 8, 35 marginTop: 8, 36 width: 44, 37 height: 44, 38 alignItems: 'center', 39 justifyContent: 'center', 40 borderRadius: 22, 41 backgroundColor: '#00000077', 42 }, 43 closeText: { 44 lineHeight: 22, 45 fontSize: 19, 46 textAlign: 'center', 47 color: '#FFF', 48 includeFontPadding: false, 49 }, 50}) 51 52export default ImageDefaultHeader