UNPKG

@devgateway/dvz-ui-react

Version:

A modular, embeddable React component library for data visualization and UI, built with TypeScript. Provides reusable components for charts, maps, dashboards, and more, with built-in support for internationalization and Redux integration.

2 lines (1 loc) 904 B
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime");require("react");const i=require("semantic-ui-react");function l(e){const c=()=>10,n=e?document.getElementById(e):null;if(n){const r=n.getBoundingClientRect().top+window.pageYOffset;window.scroll({top:r-c(),behavior:"smooth"})}}const a=function(e){return e?e.toString().replace(/&#(\d+);/g,function(c,n){return String.fromCharCode(n)}):""},s=e=>{const{contextRef:c,sections:n=[],navTitle:r,toTopLabel:u}=e;return o.jsx("div",{className:"left navigator",children:o.jsxs(i.Menu,{vertical:!0,children:[o.jsx(i.Menu.Item,{header:!0,children:r}),n.map(t=>o.jsxs(i.Menu.Item,{active:t.active,onClick:()=>l(t.id),children:[t.iconComponent?t.iconComponent:o.jsx(i.Image,{src:t.icon}),o.jsx(i.Label,{basic:!0,children:a(t.label)})]},t.label))]})})};exports.default=s;