bento-charts
Version:
Charts library for Bento-platform
11 lines • 839 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { controlPositionClasses } from './utils';
var MapLegendDiscrete = function (_a) {
var position = _a.position, legendItems = _a.legendItems;
return (_jsx("div", { className: controlPositionClasses[position], children: _jsx("div", { className: "leaflet-control bento-charts--map--legend", children: _jsx("ul", { children: legendItems.map(function (_a, i) {
var label = _a.label, color = _a.color;
return (_jsxs("li", { children: [_jsx("span", { className: "bento-charts--map--legend--patch", style: { backgroundColor: color !== null && color !== void 0 ? color : "rgba(255, 255, 255, 0)" } }), label] }, i));
}) }) }) }));
};
export default MapLegendDiscrete;
//# sourceMappingURL=MapLegendDiscrete.js.map