summaryrefslogtreecommitdiffstats
path: root/web/react/components/file_upload_overlay.jsx
blob: d991dd62520efaf1466f90c50d614ead2ee046d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

export default class FileUploadOverlay extends React.Component {
    render() {
        var overlayClass = 'file-overlay hidden';
        if (this.props.overlayType === 'right') {
            overlayClass += ' right-file-overlay';
        } else if (this.props.overlayType === 'center') {
            overlayClass += ' center-file-overlay';
        }

        return (
            <div className={overlayClass}>
                <div className='overlay__circle'>
                    <img
                        className='overlay__files'
                        src='/static/images/filesOverlay.png'
                        alt='Files'
                    />
                    <span><i className='fa fa-upload'></i>{'Drop a file to upload it.'}</span>
                    <img
                        className='overlay__logo'
                        src='/static/images/logoWhite.png'
                        width='100'
                        alt='Logo'
                    />
                </div>
            </div>
        );
    }
}

FileUploadOverlay.propTypes = {
    overlayType: React.PropTypes.string
};