npm

Need private packages and team management tools?Check out npm Orgs. »

hub-dashboard-addons

0.2.2 • Public • Published

hub-dashboard-addons

A library that provides Hub dashboard API for creating custom widgets.

Installation

NPM

  • npm install hub-dashboard-addons

CDN

    <!-- Optional: default styles of dashboard widgets -->
    <link rel="stylesheet" type="text/css" href="https://unpkg.com/hub-dashboard-addons@latest/dashboard.css">
    <!-- Include dashboard connector from CDN -->
    <script src="https://unpkg.com/hub-dashboard-addons@latest"></script> 

USAGE

// Would be just window.DashboardAddons if included from CDN
import DashboardAddons from 'hub-dashboard-addons';
// Optional, if use webpack with css-loader
import 'hub-dashboard-addons/dashboard.css';
 
DashboardAddons.registerWidget((dashboardApi, registerWidgetApi) => {
  registerWidgetApi({
    onRefresh: () => {
      console.log('refresh');
      dashboardApi.setTitle('Refreshed');
    }
  });
});

install

npm i hub-dashboard-addons

Downloadsweekly downloads

199

version

0.2.2

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability