UNPKG

opds-web-client

Version:
26 lines (25 loc) 1.32 kB
"use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var React = require("react"); var CatalogLink_1 = require("./CatalogLink"); var FacetGroup = (function (_super) { __extends(FacetGroup, _super); function FacetGroup() { return _super.apply(this, arguments) || this; } FacetGroup.prototype.render = function () { return (React.createElement("div", { className: "facet-group" }, React.createElement("h3", { className: "facet-group-label" }, this.props.facetGroup.label), React.createElement("ul", { "aria-label": this.props.facetGroup.label + " options", className: "subtle-list" }, this.props.facetGroup.facets.map(function (facet) { return React.createElement("li", { key: facet.label, className: facet.active ? "active" : null }, React.createElement(CatalogLink_1.default, { className: "facetLink", collectionUrl: facet.href }, facet.label)); })))); }; return FacetGroup; }(React.Component)); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = FacetGroup;