mattermost-mobile/app/components/post_draft/uploads/upload_item/upload_retry.js
Elias Nahum 1a605891fe
MM-22401 Refactor Post Draft (#4122)
* Babel TS and Eslint config

* Channel is archived component

* Move Typing component

* Move Uploads component

* Add PostInput component

* QuickActions components

* Add PostDraft component

* Remove old PostTextbox component

* Rename post_textbox constant

* Fix Autocomplete

* Rename blur post draft event

* Fix references

* Feedback review

* Fix autocomplete for iOS
2020-05-06 06:30:51 -04:00

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 Icon from 'react-native-vector-icons/Ionicons';
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'}
>
<Icon
name='md-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,
},
});