UNPKG

@churchapps/apphelper

Version:

Library of helper functions for React and NextJS ChurchApps

16 lines 946 B
import { jsx as _jsx } from "react/jsx-runtime"; import { Chip } from "@mui/material"; export const SecondaryMenu = (props) => { const getItems = () => { const result = []; props.menuItems.forEach((item, index) => { if (item.label === props.label) result.push(_jsx(Chip, { onClick: () => props.onNavigate(item.url), label: item.label, component: "a", variant: "filled", clickable: true, style: { backgroundColor: "var(--c1d2)", color: "#FFF", fontSize: 16 } }, item.url)); else result.push(_jsx("a", { href: "about:blank", onClick: (e) => { e.preventDefault(); props.onNavigate(item.url); }, style: { color: "#FFF", textDecoration: "none", marginLeft: 10, marginRight: 10 }, children: item.label }, item.url)); }); return result; }; return (_jsx("div", { id: "secondaryMenu", children: getItems() })); }; //# sourceMappingURL=SecondaryMenu.js.map