Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AssetProviderPlugin - Docs update #283

Merged
merged 13 commits into from
Feb 6, 2024
56 changes: 55 additions & 1 deletion docs/site/pages/plugins/asset-provider.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Asset Provider Plugin
platform: react
platform: json, react
mercillo marked this conversation as resolved.
Show resolved Hide resolved
---

# Asset Provider
Expand All @@ -9,7 +9,61 @@ The Asset Provider Plugin enables users to easily register UI components to rend

### Usage

Use the Asset Provider plugin the register your custom assets. In this example, we have components that are rendering a customer asset from type `custom-asset` and `custom`.
mercillo marked this conversation as resolved.
Show resolved Hide resolved

<PlatformTabs>
<json>
mercillo marked this conversation as resolved.
Show resolved Hide resolved
```json
{
"id": "test-flow",
"views": [
{
"id": "view-1",
"type": "collection",
"label": {
"asset": {
"id": "title",
"type": "text",
"value": "Collections are used to group assets."
}
},
"values": [
{
"asset": {
"id": "text-1",
"type": "custom-asset",
}
},
{
"asset": {
"id": "text-2",
"type": "custom",
}
}
]
}
],
"navigation": {
"BEGIN": "FLOW_1",
"FLOW_1": {
"startState": "VIEW_1",
"VIEW_1": {
"state_type": "VIEW",
"ref": "view-1",
"transitions": {
"*": "END_Done"
}
},
"END_Done": {
"state_type": "END",
"outcome": "DONE"
}
}
}
}
```

</json>
<react>

Install the plugin:
Expand Down