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: -> return false unless @props.packages packages = @props.packages.map (pkg) -> count = ({@props.packages.length}) if packages.length is 0 count = [] packages.push(
{@props.emptyText ? "No plugins to display."}
)

{@props.title} {count}

{ packages }
module.exports = PackageSet