Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aiyu-ayaan authored Feb 14, 2024
1 parent a1c340f commit 8932d72
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Now provide seamless onboarding experience to end users with just few lines of c
In your module's build.gradle

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.pseudoankit/coachmark/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.pseudoankit/coachmark)
```
```kotlin
dependencies {
implementation 'io.github.pseudoankit:coachmark:<latest_version🔝>'
}
Expand All @@ -33,12 +33,12 @@ dependencies {
## Usage

Define Keys for all coachmarks
```
```kotlin
enum class Keys { Text1, Text2 }
```

At root level make sure to wrap with UnifyCoachmark
```
```kotlin
UnifyCoachmark(
tooltip = { /* Declare Tooltip Source code below ⏬ */ Tooltip(it) },
overlayEffect = DimOverlayEffect(Color.Black.copy(alpha = .5f)),
Expand All @@ -50,7 +50,7 @@ UnifyCoachmark(

Enable coachmark for the required views with `enableCoachMark`, To access `enableCoachMark` you need to be inside `CoachmarkScope`
If you are not in `CoachmarkScope` then get access to it via LocalCoachMarkScope.current
```
```kotlin
@Composable
private fun Content() {
with(LocalCoachMarkScope.current) { // not needed if you are already in `CoachmarkScope`
Expand All @@ -71,7 +71,7 @@ private fun Content() {
```

Define tooltip view (Tootip is showing when view is highlighted currently)
```
```kotlin
@Composable
private fun Tooltip(key: CoachMarkKey) {
when (key) {
Expand Down

0 comments on commit 8932d72

Please sign in to comment.