mattermost-mobile/share_extension/components/image_file.tsx
Elias Nahum 043b3a0e8e
Refactor Android Share extension (js) (#4893)
* Refactor Android Share extension (js)

* Feedback review
2020-10-19 21:39:59 -03:00

45 lines
1 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {StyleSheet, View} from 'react-native';
import FastImage from 'react-native-fast-image';
interface ImageFileProps {
uri: string;
}
const ImageFile = ({uri}: ImageFileProps) => {
return (
<View style={styles.container}>
<FastImage
source={{uri}}
resizeMode='cover'
style={styles.image}
/>
</View>
);
};
const styles = StyleSheet.create({
container: {
justifyContent: 'center',
borderBottomLeftRadius: 4,
borderTopLeftRadius: 4,
height: 48,
marginRight: 10,
width: 48,
overflow: 'hidden',
},
image: {
alignItems: 'center',
borderBottomLeftRadius: 4,
borderTopLeftRadius: 4,
height: 46,
justifyContent: 'center',
overflow: 'hidden',
width: 48,
},
});
export default ImageFile;