mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
at offline-indicator 57 lines 1.4 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 {createHitslop} from 'lib/constants' 10import React from 'react' 11import {SafeAreaView, Text, TouchableOpacity, StyleSheet} from 'react-native' 12 13type Props = { 14 onRequestClose: () => void 15} 16 17const HIT_SLOP = createHitslop(16) 18 19const ImageDefaultHeader = ({onRequestClose}: Props) => ( 20 <SafeAreaView style={styles.root}> 21 <TouchableOpacity 22 style={styles.closeButton} 23 onPress={onRequestClose} 24 hitSlop={HIT_SLOP} 25 accessibilityRole="button" 26 accessibilityLabel="Close image" 27 accessibilityHint="Closes viewer for header image" 28 onAccessibilityEscape={onRequestClose}> 29 <Text style={styles.closeText}></Text> 30 </TouchableOpacity> 31 </SafeAreaView> 32) 33 34const styles = StyleSheet.create({ 35 root: { 36 alignItems: 'flex-end', 37 }, 38 closeButton: { 39 marginRight: 8, 40 marginTop: 8, 41 width: 44, 42 height: 44, 43 alignItems: 'center', 44 justifyContent: 'center', 45 borderRadius: 22, 46 backgroundColor: '#00000077', 47 }, 48 closeText: { 49 lineHeight: 22, 50 fontSize: 19, 51 textAlign: 'center', 52 color: '#FFF', 53 includeFontPadding: false, 54 }, 55}) 56 57export default ImageDefaultHeader