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
revealState | The RevealState of the SwipeToReveal where this action is used. |
onClick | A lambda which gets triggered when the action is clicked. |
icon | The icon which will be displayed initially on the action |
label | The label which will be displayed on the expanded action |
modifier | Modifier to be applied on the action |
interactionSource | The MutableInteractionSource representing the stream of interactions with this action. |
Create your own Component Library
Material Components are meant to be used as is and they do not allow customizations. To build your own Jetpack Compose component library use Compose Unstyled