Mailspring/internal_packages/composer/lib/image-file-upload.cjsx
Evan Morikawa e2fa53f45d feat(composer): new composer and button styles
Summary:
initial styling of image attachments

more styles for composer overflow

style composer toolbar

toolbar styling

Fixes to inline composer

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1647
2015-06-17 16:03:50 -07:00

30 lines
961 B
CoffeeScript

path = require 'path'
React = require 'react'
FileUpload = require './file-upload'
{RetinaImg, DraggableImg} = require 'nylas-component-kit'
class ImageFileUpload extends FileUpload
@displayName: 'ImageFileUpload'
@propTypes:
uploadData: React.PropTypes.object
render: =>
<div className="image-file-upload #{@props.uploadData.state}">
<div className="attachment-file-actions">
<div className="attachment-icon" onClick={@_onClickRemove}>
<RetinaImg className="image-remove-icon" name="image-cancel-button.png"/>
</div>
</div>
<div className="attachment-preview" >
<div className="attachment-name-bg"></div>
<div className="attachment-name">{@props.uploadData.fileName}</div>
<DraggableImg src={@props.uploadData.filePath} />
</div>
<span className="attachment-upload-progress" style={@_uploadProgressStyle()}></span>
</div>
module.exports = ImageFileUpload