Skip to content

Commit

Permalink
Add reveal shape details in index page
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-megh-l committed Aug 29, 2024
1 parent 8635ec8 commit f52c718
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ fun IntroShowcaseScope.Content(modifier: Modifier) {
.padding(start = 16.dp, bottom = 16.dp)
.introShowCaseTarget(
index = 3,
style = ShowcaseStyle(
style = ShowcaseStyle.Default.copy(
revealShape = RevealShape.Rounded(cornerRadius = 25f)
),
content = {
Expand Down
Binary file added docs/assets/reveal_shape.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,34 @@ fun ShowcaseSample() {
```
<img src="assets/intro2.gif" height="480" /> <img src="assets/intro3.gif" height="480" />

## How to add custom reveal shape ?

For adding a custom reveal shape like a circle, rectangle, or any other shape, you can pass the custom shape to the `revealShape` parameter of `ShowcaseStyle` class.
```kotlin
introShowCaseTarget(
index = 3,
style = ShowcaseStyle.Default.copy(
revealShape = RevealShape.Rounded(cornerRadius = 25f)
),
content = {
Column {
Text(
text = "Follow me",
color = Color.White,
fontSize = 24.sp,
fontWeight = FontWeight.Bold
)
Text(
text = "Click here to follow",
color = Color.White,
fontSize = 16.sp
)
}
},
)
```
<img src="assets/reveal_shape.gif" height="480" />

# Demo
[Sample](https://github.com/canopas/compose-intro-showcase/tree/master/app) app demonstrates how simple the usage of the library actually is.

Expand Down

0 comments on commit f52c718

Please sign in to comment.