import { type FC } from 'react'; import FastImage from '@d11/react-native-fast-image'; import { moderateScale } from 'react-native-size-matters'; import { defaultScale } from '../../utils/Common'; import { withTheme, useTheme } from '../../core/theming'; import type { Theme } from '../../utils/types'; interface Prop { source?: object; sourceUri?: string; width: number | string | undefined; height: number | string | undefined; backgroundColor?: string; resizeMode?: any; marginTop?: number; marginRight?: number; marginBottom?: number; marginLeft?: number; cache?: any; borderRadius?: number; theme: Theme; onError?: () => void; } const defaultRadius = 0; const defaultMargin = 0; const TImage: FC = ({ source, sourceUri, width, height, backgroundColor, resizeMode, marginTop, marginRight, marginBottom, marginLeft, cache, borderRadius, onError, }): any => { const { colors } = useTheme(); return ( <> {sourceUri && ( )} {source && ( )} ); }; export default withTheme(TImage);