UNPKG

uppy

Version:

Almost as cute as a Puppy :dog:

48 lines (42 loc) 1.55 kB
'use strict'; var _appendChild = require('yo-yoify/lib/appendChild'); var Row = require('./TableRow'); module.exports = function (props) { var _tbody, _browserTable; // const headers = props.columns.map((column) => { // return html` // <th class="BrowserTable-headerColumn BrowserTable-column" onclick=${props.sortByTitle}> // ${column.name} // </th> // ` // }) // <thead class="BrowserTable-header"> // <tr>${headers}</tr> // </thead> return _browserTable = document.createElement('table'), _browserTable.onscroll = props.handleScroll, _browserTable.setAttribute('class', 'BrowserTable'), _appendChild(_browserTable, [' ', (_tbody = document.createElement('tbody'), _appendChild(_tbody, [' ', props.folders.map(function (folder) { return Row({ title: props.getItemName(folder), active: props.activeRow(folder), getItemIcon: function getItemIcon() { return props.getItemIcon(folder); }, handleClick: function handleClick() { return props.handleFolderClick(folder); }, columns: props.columns }); }), ' ', props.files.map(function (file) { return Row({ title: props.getItemName(file), active: props.activeRow(file), getItemIcon: function getItemIcon() { return props.getItemIcon(file); }, handleClick: function handleClick() { return props.handleFileClick(file); }, columns: props.columns }); }), ' ']), _tbody), ' ']), _browserTable; }; //# sourceMappingURL=Table.js.map