-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af27b61
commit 4ad673b
Showing
3 changed files
with
102 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/dm-core-plugins/blueprints/stack/docs/Documentation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
`StackPlugin` allows you to stack views next to each other horizontally or vertically. | ||
|
||
## Table of contents | ||
- [Passing views](#passing-views) | ||
- [Placement config](#placement-config) | ||
|
||
### Passing views \{#passing-views} | ||
Simply pass viewConfigs in the order you want to showcase to the `items` config field. | ||
|
||
```json title="view-items.recipe.json" | ||
items: [ | ||
{ | ||
"type": "CORE:ViewConfig", | ||
"scope": "movies" | ||
}, | ||
{ | ||
"type": "CORE:ViewConfig", | ||
"scope": "shows" | ||
}, | ||
{ | ||
"type": "CORE:ViewConfig", | ||
"scope": "music", | ||
} | ||
] | ||
``` | ||
|
||
### Placement config \{#placement-config} | ||
In the plugins [config blueprint](./Blueprints.md) you can see all the ways you can place and space views. |
71 changes: 71 additions & 0 deletions
71
packages/dm-core-plugins/blueprints/stack/docs/Examples/Basic.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"title": "Basic Example", | ||
"description": "Minimal example of how to pass views through stack component", | ||
"note": "", | ||
"showDemo": true, | ||
"entityFilePrefix": "sections", | ||
"blueprint": { | ||
"name": "Section", | ||
"type": "CORE:Blueprint", | ||
"description": "", | ||
"attributes": [ | ||
{ | ||
"name": "type", | ||
"type": "dmss://system/SIMOS/BlueprintAttribute", | ||
"attributeType": "string", | ||
"optional": false | ||
} | ||
] | ||
}, | ||
"entity": { | ||
"type": "./Section", | ||
"_id": "1179c897-df62-445f-87e4-f393b4253936" | ||
}, | ||
"recipe": { | ||
"name": "section", | ||
"type": "CORE:UiRecipe", | ||
"description": "stack recipe", | ||
"plugin": "@development-framework/dm-core-plugins/stack", | ||
"config": { | ||
"type": "PLUGINS:dm-core-plugins/list/ListPluginConfig", | ||
"items": [ | ||
{ | ||
"type": "CORE:InlineRecipeViewConfig", | ||
"recipe": { | ||
"name": "box", | ||
"type": "CORE:UiRecipe", | ||
"plugin": "custom-box-plugin", | ||
"config": { | ||
"type": "PLUGINS:custom-box-plugin-blueprint", | ||
"content": "Item 1" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "CORE:InlineRecipeViewConfig", | ||
"recipe": { | ||
"name": "box2", | ||
"type": "CORE:UiRecipe", | ||
"plugin": "custom-box-plugin", | ||
"config": { | ||
"type": "PLUGINS:custom-box-plugin-blueprint", | ||
"content": "Item 2" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "CORE:InlineRecipeViewConfig", | ||
"recipe": { | ||
"name": "box3", | ||
"type": "CORE:UiRecipe", | ||
"plugin": "custom-box-plugin", | ||
"config": { | ||
"type": "PLUGINS:custom-box-plugin-blueprint", | ||
"content": "Item 3" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |