import path from 'path'; import React from 'react'; import {RetinaImg, Flexbox} from 'nylas-component-kit'; import { Actions, } from 'nylas-exports'; export default class FileUpload extends React.Component { static displayName = 'FileUpload'; static propTypes = { upload: React.PropTypes.object, }; _onClickRemove = (event) => { event.preventDefault(); Actions.removeAttachment(this.props.upload); } _extension = () => { const ext = path.extname(this.props.upload.filename.toLowerCase()) return ext.slice(1); // remove leading . } render() { return (