piral-menu
Advanced tools
Comparing version 0.8.0-pre.682 to 0.8.0-pre.683
{ | ||
"name": "piral-menu", | ||
"version": "0.8.0-pre.682", | ||
"version": "0.8.0-pre.683", | ||
"description": "Extensions for the integration of menu items in Piral.", | ||
@@ -37,3 +37,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"piral-core": "^0.8.0-pre.682" | ||
"piral-core": "^0.8.0-pre.683" | ||
}, | ||
@@ -43,3 +43,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "04da0183524adea0bae44c0f30f2b3ee1ce36e88" | ||
"gitHead": "2a3db9bdcf5523446ac735eb5f064be6afd600ba" | ||
} |
@@ -24,5 +24,5 @@ [![Piral Logo](https://github.com/smapiot/piral/raw/master/docs/assets/logo.png)](https://piral.io) | ||
```tsx | ||
renderInstance({ | ||
const instance = createInstance({ | ||
// important part | ||
extendApi: extendApis([createMenuApi]), | ||
extendApi: [createMenuApi()], | ||
// ... | ||
@@ -32,4 +32,25 @@ }); | ||
Via the options the `defaultSettings` and the global / initially available menu `items` can be defined. | ||
For example: | ||
```tsx | ||
const instance = createInstance({ | ||
// important part | ||
extendApi: [createMenuApi({ | ||
defaultSettings: { | ||
type: 'admin', | ||
}, | ||
items: [ | ||
{ | ||
component: HomeMenuItem, | ||
}, | ||
], | ||
})], | ||
// ... | ||
}); | ||
``` | ||
## License | ||
Piral is released using the MIT license. For more information see the [license file](./LICENSE). |
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
28442
55