PresentationListItem and UploadingListItem components

This commit is contained in:
Oleksandr Zhurbenko 2016-03-14 14:40:17 -07:00
parent ddf17c58ea
commit 85744b4ca6
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,25 @@
PresentationListItem = React.createClass({
handleClickShow(){
return console.info('Should show the file `' + this.name + '`');
},
handleDelete(){
return console.info('Should delete the file `' + this.name + '`');
},
render() {
var fileItemClasses = "presenter-uploader-file-item" + (this.props.current ? " current" : "" )
return(
<li onClick={this.handleClickShow} class="presenter-uploader-file-item {{#if current}}current{{/if}}">
<span class="presenter-uploader-file-item-name" data-action-show>
{this.props.name}
</span>
<span class="presenter-uploader-file-item-actions">
{this.props.current ? null :
<i class="ion-ios-eye-outline" data-action-show></i>
}
<i onClick={this.handleClickDelete} class="ion-ios-trash-outline" data-action-delete></i>
</span>
</li>
);
}
});

View File

@ -0,0 +1,16 @@
UploadingFileListItem = React.createClass ({
percUploaded() {
return Math.round((this.uploadedSize / this.size) * 100);
},
render() {
<li class="presenter-uploader-file-item is-uploading">
<span class="presenter-uploader-file-item-name">
{this.props.name}
</span>
<span class="presenter-uploader-file-item-progress">
{percUploaded}%
</span>
</li>
}
});