Skip to content

Commit

Permalink
[docs] Update documentation with buildUmlMetaInfo() function
Browse files Browse the repository at this point in the history
  • Loading branch information
nsk90 committed Sep 4, 2024
1 parent 349a519 commit 1384e55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/pages/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,16 @@ See [Mermaid nested states export sample](https://github.com/nsk90/kstatemachine

## Controlling export output

To beautify and enrich export output, you can use `UmlMetaInfo` for both `IState` and `Transition`:
To beautify and enrich export output, you can use `UmlMetaInfo` for both `IState` and `Transition`. It can be built
with `buildUmlMetaInfo()` function:

```kotlin
state("State1") {
metaInfo = UmlMetaInfo(
umlLabel = "State 1 long label",
umlStateDescriptions = listOf("Description 1", "Description 2"),
umlNotes = listOf("Note 1", "Note 2"),
)
metaInfo = buildUmlMetaInfo {
umlLabel = "State 1 long label"
umlStateDescriptions = listOf("Description 1", "Description 2")
umlNotes = listOf("Note 1", "Note 2")
}
}
```

Expand Down
1 change: 1 addition & 0 deletions docs/pages/meta_information.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The library provides `metaInfo` property for `IState` and `Transition` types.
This mechanism is extendable and users may add their own `MetaInfo` sub interfaces/classes if necessary.
Currently, the only standard implementation is `UmlMetaInfo` which is useful for export feature.
See [controlling export output](https://kstatemachine.github.io/kstatemachine/pages/export.html#controlling-export-output).
You can build it using `buildUmlMetaInfo()` function.

{: .note }
`MetaInfo` considered to be immutable data by design

0 comments on commit 1384e55

Please sign in to comment.