Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudoankit authored May 12, 2024
1 parent 00421d2 commit 898ada2
Showing 1 changed file with 19 additions and 20 deletions.
39 changes: 19 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,26 @@ Call the enableCoachMark method in all the composables that need to be highlight
```kotlin
@Composable
private fun Content() {
with(LocalCoachMarkScope.current) { // not needed if you are already in CoachmarkScope
Text(
text = "Will show tooltip 1",
modifier = Modifier
.enableCoachMark(
key = Keys.Text1, // unique key that we declared above
toolTipPlacement = ToolTipPlacement.Top,
highlightedViewConfig = HighlightedViewConfig(
shape = HighlightedViewConfig.Shape.Rect(12.dp),
padding = PaddingValues(8.dp)
),
tooltip = {
Balloon(arrow = Arrow.Start()) {
Text(
text = "Highlighting Text1",
)
}
Text(
text = "Will show tooltip 1",
modifier = Modifier
.enableCoachMark(
key = Keys.Text1, // unique key that we declared above
toolTipPlacement = ToolTipPlacement.Top,
highlightedViewConfig = HighlightedViewConfig(
shape = HighlightedViewConfig.Shape.Rect(12.dp),
padding = PaddingValues(8.dp)
),
tooltip = {
Balloon(arrow = Arrow.Start()) {
Text(
text = "Highlighting Text1",
)
}
)
)
}
},
coachMarkScope = LocalCoachMarkScope.current // not needed if you are already in CoachmarkScope
)
)
}
```

Expand Down

0 comments on commit 898ada2

Please sign in to comment.