diff --git a/src/utils/legendmaker.js b/src/utils/legendmaker.js index 637eaf554..624471b6c 100644 --- a/src/utils/legendmaker.js +++ b/src/utils/legendmaker.js @@ -239,7 +239,7 @@ export const renderExtendedThematicLegendItem = function renderExtendedThematicL export const Legend = function Legend({ styleRules, layer, viewer, clickable = true, opacity = 1 } = {}) { - const noLegend = 'Legend saknas'; + const noLegend = 'Teckenförklaring saknas'; if (Array.isArray(styleRules)) { let styleName; const layerType = layer.get('type'); @@ -293,7 +293,9 @@ export const Legend = function Legend({ }); return El({ components: cmps, tagName: 'ul' }); } - return El({ innerHTML: noLegend }); + const noLegendInner = El({ innerHTML: noLegend, tagName: 'li', cls: 'padding-smaller text-smaller' }); + const noLegendOuter = El({ components: [noLegendInner], tagName: 'ul' }); + return noLegendOuter; }; export const HeaderIcon = function HeaderIcon(styleRules, opacity = 1) {