import React from "react"; import { Image as RNImage, ImageProps, Platform, StyleSheet, View, } from "react-native"; import checkerboard from "../../images/checkerboard.svg"; import styledComponent from "../../utils/styledComponent"; type Props = ImageProps & { background?: boolean | string; }; const Image = styledComponent(RNImage); const ImageComponent = ({ background, style, ...props }: Props) => { if (background && Platform.OS === "web") { const { height, width, margin, marginTop, marginBottom, marginLeft, marginRight, marginStart, marginEnd, marginHorizontal, marginVertical, ...rest } = StyleSheet.flatten(style) || {}; return ( ); } return ; }; export default ImageComponent;