// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import React from 'react'; import {Animated, StyleProp, StyleSheet} from 'react-native'; import FastImage, {ImageStyle, Source} from 'react-native-fast-image'; const AnimatedFastImage = Animated.createAnimatedComponent(FastImage); type ThumbnailProps = { onError: () => void; opacity?: number | Animated.AnimatedInterpolation | Animated.AnimatedValue; source?: Source; style: StyleProp; } const Thumbnail = ({onError, opacity, style, source}: ThumbnailProps) => { if (source?.uri) { return ( ); } const tintColor = StyleSheet.flatten(style).tintColor; return ( ); }; export default Thumbnail;