UNPKG

opds-web-client

Version:
24 lines (23 loc) 1.33 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 styles_1 = require("./styles"); var FacetGroup = (function (_super) { __extends(FacetGroup, _super); function FacetGroup() { _super.apply(this, arguments); } FacetGroup.prototype.render = function () { return (React.createElement("div", {style: { padding: "10px" }}, React.createElement("h3", {className: "facet-group-label", style: { margin: 0 }}, this.props.facetGroup.label, ":"), React.createElement("ul", {"aria-label": this.props.facetGroup.label + " options", style: styles_1.subtleListStyle}, this.props.facetGroup.facets.map(function (facet) { return React.createElement("li", {key: facet.label, style: facet.active ? { backgroundColor: "#ddd" } : 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;