gd-sprest-js
Version:
SharePoint 2013/Online js components.
22 lines (21 loc) • 561 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var _1 = require(".");
/**
* List
*/
exports.List = function (props) {
var items = props.items && props.items.length > 0 ? props.items : [];
var html = "";
// Parse the items
for (var i = 0; i < items.length; i++) {
// Update the item
html += (i == 0 ? '' : '\n') + _1.ListItem(items[i]);
}
// Return the template
return [
'<ul class="ms-List ' + (props.className || "") + '">',
html,
'</ul>'
].join('\n');
};