Skip to content

Commit c73dbc9

Browse files
committed
chore(custo-api): micro app inetgration
1 parent 24f0750 commit c73dbc9

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docs/javascript/api.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,39 @@ window.lumapps.customize(({ components }) => {
782782

783783
**IMPORTANT:** The Dialog component is meant to be used only one time during the life cycle of a user's session. Meaning that this Dialog will be displayed, the user will close it, and the Dialog will not display again during the user's session. Reusing a Dialog and displaying it multiple times once it has already been closed is not supported.
784784

785+
#### MicroApp
786+
787+
This component allows to display a [micro app](https://docs.lumapps.com/docs/ls/content/3975133065180467/knowledge-l40063457350627685) on any of the Customizations API extension points. This can be done by using the micro app's id (which can be retrieved from the [Installed extensions](https://docs.lumapps.com/docs/ls/content/5508517796380672/admin-l9568619807585214extensions#installed-extensions) section by browsing the Settings of each extension) and using it.
788+
789+
```js
790+
window.lumapps.customize(({ components, constants, render }) => {
791+
const { MicroApp, Card } = components;
792+
793+
render({
794+
placement: placement.ABOVE,
795+
target: targets.USER_PROFILE_ORG_CHART,
796+
toRenderWithContext: () => {
797+
return Card({
798+
className: 'user-about-page__article',
799+
children: [
800+
MicroApp({
801+
id: '<your micro app id>'
802+
}),
803+
],
804+
});
805+
},
806+
});
807+
})
808+
```
809+
810+
`MicroApp` options:
811+
812+
| Option | Description | Is required? | Option type | Default Value |
813+
|-------------|---------------------------------------------------------------------|--------------|-----------------------------------------|---------------|
814+
| `id` | The id of the micro app you want to display | Yes | `string` | `undefined` |
815+
816+
**IMPORTANT:** Micro Apps can vary when it comes to their size, so it is imperative that, when integrating a Micro App with any of the Customizations API extension points, the developer makes sure that the used Micro App does not tamper with the default layout of the page and its surroundings. Is up to the developer to make sure that the customized feature does not impact LumApps's out-of-the-box functionalities.
817+
785818
#### Skeletons
786819

787820
Skeleton are primitives shapes which mimic a piece of content in a recognizable way. It communicate loading states. There are three variants:

0 commit comments

Comments
 (0)