mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
* Updating client dependancies. Switching to using yarn. * Updating React * Moving pure components to using function syntax (performance gains with newer react version) * Updating client dependancies. * Ignore .yarninstall * Enabling pre-lockfile because it's the entire point of using yarn. * Removing old webpack config * Moving to new prop-types * Fixing ESLint Errors * Updating jest snapshots. * Cleaning up package.json
51 lines
1.5 KiB
JavaScript
51 lines
1.5 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See License.txt for license information.
|
|
|
|
import {FormattedMessage} from 'react-intl';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import React from 'react';
|
|
|
|
import fileOverlayImage from 'images/filesOverlay.png';
|
|
import overlayLogoImage from 'images/logoWhite.png';
|
|
|
|
export default function FileUploadOverlay(props) {
|
|
var overlayClass = 'file-overlay hidden';
|
|
if (props.overlayType === 'right') {
|
|
overlayClass += ' right-file-overlay';
|
|
} else if (props.overlayType === 'center') {
|
|
overlayClass += ' center-file-overlay';
|
|
}
|
|
|
|
return (
|
|
<div className={overlayClass}>
|
|
<div className='overlay__indent'>
|
|
<div className='overlay__circle'>
|
|
<img
|
|
className='overlay__files'
|
|
src={fileOverlayImage}
|
|
alt='Files'
|
|
/>
|
|
<span><i className='fa fa-upload'/>
|
|
<FormattedMessage
|
|
id='upload_overlay.info'
|
|
defaultMessage='Drop a file to upload it.'
|
|
/>
|
|
</span>
|
|
<img
|
|
className='overlay__logo'
|
|
src={overlayLogoImage}
|
|
width='100'
|
|
alt='Logo'
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
FileUploadOverlay.propTypes = {
|
|
overlayType: PropTypes.string
|
|
};
|