import React from 'react'; import { Box, Icon, PressBox, Text, createStyleSheet, useHeaderStyle, useUIKitTheme, } from '@sendbird/uikit-react-native-foundation'; import { truncate, useSafeAreaPadding } from '@sendbird/uikit-utils'; type Props = { headerShown?: boolean; topInset: number; onClose: () => void; title: string; subtitle: string; }; const FileViewerHeader = ({ headerShown = true, topInset, onClose, subtitle, title }: Props) => { const { palette } = useUIKitTheme(); const { defaultHeight } = useHeaderStyle(); const safeArea = useSafeAreaPadding(['left', 'right']); if (!headerShown) return null; return ( {truncate(title, { mode: 'mid', maxLen: 18 })} {subtitle} ); }; const styles = createStyleSheet({ container: { zIndex: 1, top: 0, start: 0, end: 0, position: 'absolute', flexDirection: 'row', alignItems: 'center', justifyContent: 'center', paddingHorizontal: 12, }, buttonContainer: { width: 32, height: 32, alignItems: 'center', justifyContent: 'center', }, titleContainer: { flex: 1, alignItems: 'center', justifyContent: 'center', }, title: { marginBottom: 2, }, }); export default FileViewerHeader;