piral-dashboard
Advanced tools
Comparing version 0.10.0-pre.846 to 0.10.0-pre.853
{ | ||
"name": "piral-dashboard", | ||
"version": "0.10.0-pre.846", | ||
"version": "0.10.0-pre.853", | ||
"description": "Plugin for creating a centralized dashboard in Piral.", | ||
@@ -38,3 +38,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"piral-core": "^0.10.0-pre.846" | ||
"piral-core": "^0.10.0-pre.853" | ||
}, | ||
@@ -44,3 +44,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "bf161f59f5b0b218f7443a4cf61534edd2aef929" | ||
"gitHead": "840155ef91a8f43f65ded5e18985ad25074bdc63" | ||
} |
@@ -21,4 +21,43 @@ [![Piral Logo](https://github.com/smapiot/piral/raw/master/docs/assets/logo.png)](https://piral.io) | ||
## Usage | ||
> For authors of pilets | ||
You can use the `registerTile` function from the Pilet API to add a new tile in the app shell. | ||
**Note**: When the first argument is a string we call it a *named* tile. | ||
Example use: | ||
```ts | ||
import { PiletApi } from '<name-of-piral-instance>'; | ||
import { MyTile } from './MyTile'; | ||
export function setup(piral: PiletApi) { | ||
piral.registerTile(MyTile); | ||
} | ||
``` | ||
You can use the `unregisterTile` function from the Pilet API to remove a previously added tile from the app shell. | ||
**Note**: You'll need to have added a *named* tile in order to be able to remove it. | ||
Example use: | ||
```ts | ||
import { PiletApi } from '<name-of-piral-instance>'; | ||
import { MyTile } from './MyTile'; | ||
export function setup(piral: PiletApi) { | ||
// register with a name | ||
piral.registerTile('first', MyTile); | ||
// and unregister; maybe some time later? | ||
piral.unregisterTile('first'); | ||
} | ||
``` | ||
## Setup and Bootstrapping | ||
> For Piral instance developers | ||
The provided library only brings API extensions for pilets to a Piral instance. | ||
@@ -25,0 +64,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20721
110