mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 10:38:11 +08:00
449e11cdda
Summary: Initial styles on attachments ui More file uploading UI fix race condition in draft saving attachments and uploads interweaved Test Plan: edgehill --test Reviewers: bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D1610
28 lines
805 B
CoffeeScript
28 lines
805 B
CoffeeScript
path = require 'path'
|
|
React = require 'react'
|
|
FileUpload = require './file-upload'
|
|
{RetinaImg} = require 'nylas-component-kit'
|
|
|
|
class ImageFileUpload extends FileUpload
|
|
@displayName: 'ImageFileUpload'
|
|
|
|
@propTypes:
|
|
uploadData: React.PropTypes.object
|
|
|
|
render: =>
|
|
<div className="image-file-upload #{@props.uploadData.state}">
|
|
<span className="attachment-file-actions">
|
|
<div className="attachment-icon" onClick={@_onClickRemove}>
|
|
<RetinaImg className="remove-icon" name="remove-attachment.png"/>
|
|
</div>
|
|
</span>
|
|
|
|
<div className="attachment-preview" >
|
|
<img src={@props.uploadData.filePath} />
|
|
</div>
|
|
|
|
<span className="attachment-upload-progress" style={@_uploadProgressStyle()}></span>
|
|
|
|
</div>
|
|
|
|
module.exports = ImageFileUpload
|