* Use Compass icons * Update ChannelInfo and AdvancedSettings * Fix search modifiers * Fix Autocomplete item * Remove VectorIcon component * Unlink react-native-vector-icons * Revert ProgressiveImage changes * Update Mark as Unread icon * Apply review suggestion * Replace extension icons * Update video control button style * Replace (un)flag with (un)save * Replace (un)flag with (un)save - take 2 * Use bookmark-outline icon Co-authored-by: Miguel Alatzar <miguel@Miguels-MacBook-Pro.local>
50 lines
1.3 KiB
JavaScript
50 lines
1.3 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import React, {PureComponent} from 'react';
|
|
import PropTypes from 'prop-types';
|
|
import {StyleSheet} from 'react-native';
|
|
|
|
import CompassIcon from '@components/compass_icon';
|
|
import TouchableWithFeedback from '@components/touchable_with_feedback';
|
|
|
|
export default class UploadRetry extends PureComponent {
|
|
static propTypes = {
|
|
file: PropTypes.object.isRequired,
|
|
onPress: PropTypes.func.isRequired,
|
|
};
|
|
|
|
handleOnPress = () => {
|
|
const {file, onPress} = this.props;
|
|
|
|
onPress(file);
|
|
};
|
|
|
|
render() {
|
|
return (
|
|
<TouchableWithFeedback
|
|
style={style.failed}
|
|
onPress={this.handleOnPress}
|
|
type='opacity'
|
|
>
|
|
<CompassIcon
|
|
name='refresh'
|
|
size={25}
|
|
color='#fff'
|
|
/>
|
|
</TouchableWithFeedback>
|
|
);
|
|
}
|
|
}
|
|
|
|
const style = StyleSheet.create({
|
|
failed: {
|
|
backgroundColor: 'rgba(0, 0, 0, 0.8)',
|
|
position: 'absolute',
|
|
height: '100%',
|
|
width: '100%',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
borderRadius: 4,
|
|
},
|
|
});
|