@cromwell/plugin-main-menu

2.0.0-alpha.0 • Public • Published

Menu plugin for Cromwell CMS

Add website navigation. Elements can be edited on the admin panel plugin's page.

Supports desktop (row) and mobile (column) modes. You need to use your own solution to detect mobile screen, the plugin needs mobile prop to display mobile mode. Otherwise will be displayed desktop mode.

Custom elements:

  • MenuItem
  • IconButton
  • Popover

Example of usage:

import { IconButton, MenuItem, Popover } from '@mui/material';
import { CPlugin, registerPluginSSR } from '@cromwell/core-frontend';

registerPluginSSR('@cromwell/plugin-main-menu', '*');

export default function MyPage() {
  return (
    <CPlugin
      id="menu"
      pluginName="@cromwell/plugin-main-menu"
      plugin={{
        instanceSettings: {
          mobile: true,
          elements: {
            MenuItem,
            IconButton,
            Popover,
          },
        },
      }}
    />
  );
}

Readme

Keywords

none

Package Sidebar

Install

npm i @cromwell/plugin-main-menu

Weekly Downloads

8

Version

2.0.0-alpha.0

License

MIT

Unpacked Size

23.6 kB

Total Files

10

Last publish

Collaborators

  • elrix