@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) • 808 B
JavaScript
;const o=require("react/jsx-runtime");require("react");const c=require("semantic-ui-react");function s(e){const i=()=>10,n=e?document.getElementById(e):null;if(n){const r=n.getBoundingClientRect().top+window.pageYOffset;window.scroll({top:r-i(),behavior:"smooth"})}}const a=function(e){return e?e.toString().replace(/&#(\d+);/g,function(i,n){return String.fromCharCode(n)}):""},l=e=>{const{contextRef:i,sections:n=[],navTitle:r,toTopLabel:u}=e;return o.jsx("div",{className:"left navigator",children:o.jsxs(c.Menu,{vertical:!0,children:[o.jsx(c.Menu.Item,{header:!0,children:r}),n.map(t=>o.jsxs(c.Menu.Item,{active:t.active,onClick:()=>s(t.id),children:[t.iconComponent?t.iconComponent:o.jsx(c.Image,{src:t.icon}),o.jsx(c.Label,{basic:!0,children:a(t.label)})]},t.label))]})})};module.exports=l;