@blaze-cms/plugin-admin-core-ui

0.144.0 • Public • Published

Admin Core UI

On load the plugin accepts the following options

homeRoute

Used to define what the home route for admin, this will be used for redirects as well, defaults to '/'

Mocked config used to test the Menu component

const mockedMenuConfig = {
  main: {
    order: 2,
    items: [
      {
        content: {
          icon: () => (
            <svg
              xmlns="http://www.w3.org/2000/svg"
              fill="none"
              viewBox="0 0 24 24"
              strokeWidth={1.5}
              stroke="currentColor"
              width="24"
              height="24"
              className="w-6 h-6">
              <path
                strokeLinecap="round"
                strokeLinejoin="round"
                d="M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"
              />
            </svg>
          ),
          label: 'Content',
          order: 1,
          items: {
            article: {
              label: 'Article',
              uri: '/data-listing/article',
              order: 2.1
            },
            page: {
              label: 'Page',
              uri: '/data-listing/Page',
              order: 1
            }
          }
        }
      },
      {
        enquiry: {
          icon: () => (
            <svg
              xmlns="http://www.w3.org/2000/svg"
              fill="none"
              viewBox="0 0 24 24"
              strokeWidth={1.5}
              stroke="currentColor"
              width="24"
              height="24"
              className="w-6 h-6">
              <path
                strokeLinecap="round"
                strokeLinejoin="round"
                d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9 5.25h.008v.008H12v-.008z"
              />
            </svg>
          ),
          label: 'Enquiry',
          uri: '/data-listing/enquiry',
          order: 2
        }
      }
    ]
  },
  top: {
    order: 1,
    items: {
      search: {
        icon: () => (
          <svg
            xmlns="http://www.w3.org/2000/svg"
            fill="none"
            viewBox="0 0 24 24"
            strokeWidth={1.5}
            stroke="currentColor"
            width="24"
            height="24"
            className="w-4 h-4">
            <path
              strokeLinecap="round"
              strokeLinejoin="round"
              d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"
            />
          </svg>
        ),
        label: 'Search',
        onClick: () => 'open search modal'
      }
    }
  }
};

Readme

Keywords

none

Package Sidebar

Install

npm i @blaze-cms/plugin-admin-core-ui

Weekly Downloads

304

Version

0.144.0

License

GPL-3.0

Unpacked Size

1.39 MB

Total Files

197

Last publish

Collaborators

  • ismael_haytam
  • emcleandev
  • tanane
  • daoyong
  • marekb9
  • mcabrerapf
  • jan_byte9
  • grzegorzi
  • andypail
  • ishrat
  • adrdilauro