Skip to content

Commit

Permalink
Create README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MathRoda authored Dec 6, 2022
1 parent f56339a commit 91ad505
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
![banner](https://user-images.githubusercontent.com/92212925/205930069-886166b7-4c33-47bc-a498-1e82596d0cdd.png)<br>
<p align="center">
🎨 Snackie is a custom snackbar library for jetpack compose built without using the built in snackbar component
</p>


## πŸ“š Implementation
```gradle
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.mathroda:Snackie:latest-version'
}
```


## πŸ… How to use it ?


### Snackie Success βœ…

<img src="https://user-images.githubusercontent.com/92212925/205937500-36dfaa43-8038-4400-ba31-02691b4e6050.gif" align="right" width="25%" />

```kotlin
Column( modifier = Modifier.fillMaxSize()) {

val state = rememberSnackieState()

Button(onClick = { state.addMessage("This is a Success Message!") }) {
Text(text = "Success")
}

SnackieSuccess(state = state)
}
```

### Snackie Error ❌
```kotlin
Column( modifier = Modifier.fillMaxSize()) {

val state = rememberSnackieState()

Button(onClick = { state.addMessage("This is a Error Message!") }) {
Text(text = "Error")
}

SnackieError(state = state)
}
```

### Snackie Custom πŸ—
```kotlin
Column( modifier = Modifier.fillMaxSize()) {

val state = rememberSnackieState()

Button(onClick = { state.addMessage("This is a Custom Message!") }) {
Text(text = "Custom")
}

SnackieCustom(
state = state,
position = SnackiePosition.Float,
duration = 3000L,
icon = Icons.Default.Star,
containerColor = Color.Gray,
contentColor = Color.White,
enterAnimation = fadeIn(),
exitAnimation = fadeOut(),
verticalPadding = 12.dp,
horizontalPadding = 12.dp
)
}
```

# 🌍 Contribution

Please feel free to contribute!

If this will be your first contributon, you can check this [website.](https://opensource.guide/how-to-contribute/)

0 comments on commit 91ad505

Please sign in to comment.