feat: make AppIcon size adjustable

This commit is contained in:
Ushie 2022-11-13 23:08:27 +03:00
parent 2eb37b81c8
commit ceeab7ea0c
No known key found for this signature in database
GPG Key ID: 0EF73F1CA38B2D5F

View File

@ -9,10 +9,14 @@ import androidx.compose.ui.unit.dp
import com.google.accompanist.drawablepainter.rememberDrawablePainter import com.google.accompanist.drawablepainter.rememberDrawablePainter
@Composable @Composable
fun AppIcon(drawable: Drawable?, contentDescription: String?) { fun AppIcon(
drawable: Drawable?,
contentDescription: String?,
size: Int = 48
) {
Image( Image(
rememberDrawablePainter(drawable), rememberDrawablePainter(drawable),
contentDescription, contentDescription,
Modifier.size(48.dp) Modifier.size(size.dp)
) )
} }