mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-29 21:44:26 +02:00
refactor: Add parameters for custom rotation values in ArrowButton
This commit is contained in:
parent
edc11b6e1d
commit
936a9efd0b
@ -13,10 +13,16 @@ import androidx.compose.ui.res.stringResource
|
||||
import app.revanced.manager.R
|
||||
|
||||
@Composable
|
||||
fun ArrowButton(modifier: Modifier = Modifier, expanded: Boolean, onClick: (() -> Unit)?) {
|
||||
fun ArrowButton(
|
||||
modifier: Modifier = Modifier,
|
||||
expanded: Boolean,
|
||||
onClick: (() -> Unit)?,
|
||||
rotationInitial: Float = 0f,
|
||||
rotationFinal: Float = 180f
|
||||
) {
|
||||
val description = if (expanded) R.string.collapse_content else R.string.expand_content
|
||||
val rotation by animateFloatAsState(
|
||||
targetValue = if (expanded) 0f else 180f,
|
||||
targetValue = if (expanded) rotationInitial else rotationFinal,
|
||||
label = "rotation"
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user