pitaya-launcher/js/components/edit/desktop-app-list.jsx

34 lines
831 B
JavaScript

var React = require('react');
var Util = require('../../util');
var DesktopAppItem = require('./desktop-app-item.jsx');
var path = require('path');
var debug = require('../../util/debug')('pitaya:desktop-app-list');
var DesktopAppList = React.createClass({
render: function() {
var items = this.props.desktopApps.map(function(desktopApp, i) {
var desktopEntry = desktopApp.content['Desktop Entry'];
return (
<DesktopAppItem theme={this.props.selectedTheme}
key={desktopApp.path}
desktopEntry={desktopEntry}
onItemDropped={this.props.onItemDropped} />
);
}.bind(this));
return (
<div className="apps-list">
<ul className="desktop-apps list-group">
{items}
</ul>
</div>
);
}
});
module.exports = DesktopAppList;