import React from 'react'; import { View, StyleSheet } from 'react-native'; import FastImage from 'react-native-fast-image'; import PropTypes from 'prop-types'; import { BLOCK_CONTEXT } from '@rocket.chat/ui-kit'; import ImageContainer from '../message/Image'; import Navigation from '../../lib/Navigation'; const styles = StyleSheet.create({ image: { borderRadius: 2 }, mediaContext: { marginRight: 8 } }); const ThumbContext = args => ; export const Thumb = ({ element, size = 88 }) => ( ); Thumb.propTypes = { element: PropTypes.object, size: PropTypes.number }; export const Media = ({ element, theme }) => { const showAttachment = attachment => Navigation.navigate('AttachmentView', { attachment }); const { imageUrl } = element; return ( ); }; Media.propTypes = { element: PropTypes.object, theme: PropTypes.string }; const genericImage = (element, context, theme) => { switch (context) { case BLOCK_CONTEXT.SECTION: return ; case BLOCK_CONTEXT.CONTEXT: return ; default: return ; } }; export const Image = ({ element, context, theme }) => genericImage(element, context, theme);