Mailspring/internal_packages/settings/lib/package-set.cjsx
Ben Gotow a3b45cf33a feature(package-management): Package management interface, APM integration
Summary:
Update a few more packages to deactivate properly

Miscelaneous fixes

Initial commit of new settings package

WIP

WIP - can load and unload and install / uninstall

Click to create new boilerplate package, package updating

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1582
2015-06-02 19:04:21 -07:00

25 lines
673 B
CoffeeScript

React = require 'react'
Package = require './package'
class PackageSet extends React.Component
@propTypes:
'title': React.PropTypes.string.isRequired
'packages': React.PropTypes.array.isRequired
'emptyText': React.PropTypes.string
render: ->
packages = @props.packages.map (pkg) -> <Package package={pkg} />
count = <span>({@props.packages.length})</span>
if packages.length is 0
count = []
packages.push(
<div className="empty">{@props.emptyText ? "No packages to display."}</div>
)
<div className="package-set">
<h2>{@props.title} {count}</h2>
{ packages }
</div>
module.exports = PackageSet