import { ClassAttributes, ComponentProps, ComponentType } from 'react'; import { Image as NativeImage, ImageStyle as NativeImageStyle, StyleProp } from 'react-native'; import { WebViewStyle } from './View'; import { createSafeStyledView } from '../css/createSafeStyledView'; type NativeImageProps = ComponentProps & ClassAttributes; export interface WebImageStyle { opacity?: number; } export type ImageStyle = Omit & WebImageStyle & WebViewStyle; export type WebImageProps = { style?: StyleProp; /** @platform web */ tabIndex?: number; /** * Set whether the image can be dragged with native browser behavior. * @platform web */ draggable?: boolean; }; export type ImageProps = Omit & WebImageProps; const Image = NativeImage as ComponentType; export default createSafeStyledView(Image) as ComponentType;