mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
[demo-compose] Refactor modifier with better Kotlin syntax
PiperOrigin-RevId: 713476190
This commit is contained in:
parent
314413365b
commit
709d3fd35e
1 changed files with 7 additions and 10 deletions
|
|
@ -23,13 +23,10 @@ import androidx.compose.runtime.remember
|
|||
import androidx.compose.ui.Modifier
|
||||
|
||||
@Composable
|
||||
internal fun Modifier.noRippleClickable(onClick: () -> Unit): Modifier {
|
||||
return then(
|
||||
clickable(
|
||||
interactionSource = remember { MutableInteractionSource() },
|
||||
indication = null, // to prevent the ripple from the tap
|
||||
) {
|
||||
onClick()
|
||||
}
|
||||
)
|
||||
}
|
||||
internal fun Modifier.noRippleClickable(onClick: () -> Unit): Modifier =
|
||||
clickable(
|
||||
interactionSource = remember { MutableInteractionSource() },
|
||||
indication = null, // to prevent the ripple from the tap
|
||||
) {
|
||||
onClick()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue