import React, { ReactElement } from 'react'; import { useTranslation } from 'react-i18next'; import { Dimensions, StyleSheet, View } from 'react-native'; import { LinearProgress, Overlay } from 'react-native-elements'; import { Button, Column, Text } from './ui'; import { Theme } from './ui/styleUtils'; import Svg, { Mask, Rect } from 'react-native-svg'; export const MessageOverlay: React.FC = props => { const { t } = useTranslation('common'); const style = StyleSheet.create({ customHeight: { minHeight: props.minHeight ? props.minHeight : props.progress ? 100 : 170, }, }); const isHighlightMode = props.overlayMode === 'highlight'; return ( {isHighlightMode ? ( true} onResponderRelease={props.onBackdropPress} > {props.cardLayout && ( <> )} ) : ( (props.title || props.message || props.children) && ( {props.title && ( {props.title} )} {props.message && ( {props.message} )} {props.progress && } {props.hint && ( {props.hint} )} {props.children} {!props.children && props.onButtonPress ? (