UNPKG

stackpress

Version:

Incept is a content management framework.

6 lines (5 loc) 459 B
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; export default function LayoutMenu(props) { const { path = '', menu = [] } = props; return (_jsx(_Fragment, { children: menu.map((item, index) => (_jsxs("a", { className: `menu-item ${path.startsWith(item.match) ? 'active' : ''}`, href: item.path, children: [item.icon && (_jsx("i", { className: `icon fas fa-fw fa-${item.icon}` })), item.name] }, index))) })); }