Minor refactoring for better maintainibility

Этот коммит содержится в:
Reed Garmsen
2015-08-13 16:00:55 -07:00
родитель 6f68c508ee
Коммит 3a55cc6dcb
3 изменённых файлов: 16 добавлений и 8 удалений

Просмотреть файл

@@ -3,9 +3,19 @@
module.exports = React.createClass({
displayName: 'FileUploadOverlay',
propTypes: {
overlayType: React.PropTypes.string
},
render: function() {
var overlayClass = 'file-overlay invisible';
if (this.props.overlayType === 'right') {
overlayClass += ' right-file-overlay';
} else if (this.props.overlayType === 'center') {
overlayClass += ' center-file-overlay';
}
return (
<div className='file-overlay center-file-overlay invisible'>
<div className={overlayClass}>
<div>
<i className='fa fa-upload'></i>
<span>Drop a file to upload it.</span>