SwipeToRevealPrimaryAction

Composable Component

A composable which can be used for setting the primary action of material SwipeToRevealCard and SwipeToRevealChip.

Android
@ExperimentalWearMaterialApi
@Composable
public fun SwipeToRevealPrimaryAction(
    revealState: RevealState,
    onClick: () -> Unit,
    icon: @Composable () -> Unit,
    label: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    interactionSource: MutableInteractionSource? = null,
): Unit

Parameters

revealStateThe RevealState of the SwipeToReveal where this action is used.
onClickA lambda which gets triggered when the action is clicked.
iconThe icon which will be displayed initially on the action
labelThe label which will be displayed on the expanded action
modifierModifier to be applied on the action
interactionSourceThe MutableInteractionSource representing the stream of interactions with this action.