Skip to content

Commit 1384e55

Browse files
committed
[docs] Update documentation with buildUmlMetaInfo() function
1 parent 349a519 commit 1384e55

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docs/pages/export.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,16 @@ See [Mermaid nested states export sample](https://github.com/nsk90/kstatemachine
6464

6565
## Controlling export output
6666

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

6970
```kotlin
7071
state("State1") {
71-
metaInfo = UmlMetaInfo(
72-
umlLabel = "State 1 long label",
73-
umlStateDescriptions = listOf("Description 1", "Description 2"),
74-
umlNotes = listOf("Note 1", "Note 2"),
75-
)
72+
metaInfo = buildUmlMetaInfo {
73+
umlLabel = "State 1 long label"
74+
umlStateDescriptions = listOf("Description 1", "Description 2")
75+
umlNotes = listOf("Note 1", "Note 2")
76+
}
7677
}
7778
```
7879

docs/pages/meta_information.md

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

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

0 commit comments

Comments
 (0)