Skip to content

Latest commit

 

History

History

catalogue

catalogue @libp2p/observer-catalogue

This package exports components allowing the deployment of a browsable catalogue of libp2p Introspection Widgets

Exported API

Catalogue({ widgets*, Content, title }) default export

  • widgets (required): Array of imported widgets
  • Content (optional): React element to override the default introductory homepage text
  • title (optional): String to override the default HTML page title
  • theme (optional): Object to replace the default SDK theme

Example:

import React from 'react'
import ReactDOM from 'react-dom'
import Catalogue from '@libp2p/observer-catalogue'
import * as connectionsTable from '@libp2p/observer-connections-table'
import * as eventsTable from '@libp2p/observer-events-table'

const widgets = [connectionsTable, eventsTable]
ReactDOM.render(
  <Catalogue widgets={widgets} />,
  document.getElementById('root')
)

serviceWorker

A Create React App service worker which may improve performance for some catalogue builds. See https://create-react-app.dev/docs/making-a-progressive-web-app/ for details and guidance.