Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

intermix-menu-item

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intermix-menu-item

Intermix Menu Item Extension API

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

Intermix Menu Item

When dealing with multiple frontend technologies, we will run into the issue of not having access to React components (like NavLink) , that will be required for the layout items like the menu or dashboard. This plugin will abstract out access to these React components and make them available to other non-React pilet apps.

Documentation

The following functions are brought to the Pilet API.

createLinkApi

Setup and Bootstrapping

The provided library only brings API extensions for pilets to a Piral instance.

For the setup of the library itself you'll need to import createLinkApi from the piral-navlink package.

import { createLinkApi } from "piral-navlink";

The integration looks like:

const instance = createInstance({
  // important part
  extendApi: [createLinkApi()]
  // ...
});

Create a menu link component based on NavLink

createLink(to: string, name: string): ComponentType;

Usage

piral.registerMenu(() => app.createLink("/svlete-app", "Svelte App"));

License

MIT

Keywords

piral

FAQs

Package last updated on 27 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts