mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-18 18:27:03 +05:30
app: replace deprecated contentColor extension
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
53643c9c5a
commit
d8435602d3
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ package dev.msfjarvis.lobsters.compose.utils
|
|||
|
||||
import androidx.annotation.DrawableRes
|
||||
import androidx.compose.foundation.Icon
|
||||
import androidx.compose.foundation.contentColor
|
||||
import androidx.compose.foundation.AmbientContentColor
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
@ -28,7 +28,7 @@ import androidx.compose.ui.res.loadVectorResource
|
|||
fun IconResource(
|
||||
@DrawableRes resourceId: Int,
|
||||
modifier: Modifier = Modifier,
|
||||
tint: Color = contentColor()
|
||||
tint: Color = AmbientContentColor.current
|
||||
) {
|
||||
val deferredResource = loadVectorResource(resourceId)
|
||||
deferredResource.onLoadRun { asset ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue