From 898ada253da953cdd1b82d404d713d32a56dc09f Mon Sep 17 00:00:00 2001 From: Ankit Kumar <54987308+pseudoankit@users.noreply.github.com> Date: Sun, 12 May 2024 13:09:01 +0530 Subject: [PATCH] Update README.md --- README.md | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index a389425..c2a311c 100644 --- a/README.md +++ b/README.md @@ -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 + ) + ) } ```