CornerAction.Custom

@Immutable
class CornerAction.Custom : CornerAction


Fully custom corner action button.

Note: When instantiating inside a Composable, memoize onClick and icon using androidx.compose.runtime.remember to avoid unnecessary recompositions.

Summary

Public constructors

Custom(
    text: String?,
    icon: Painter,
    onClick: () -> Unit,
    style: CornerAction.Style
)

Public properties

Painter

Icon to display for the corner action button.

() -> Unit

Callback invoked when the button is clicked.

open CornerAction.Style

The visual style of the button.

String?

Optional accessibility description for screen readers.

Public constructors

Custom

Custom(
    text: String? = null,
    icon: Painter,
    onClick: () -> Unit,
    style: CornerAction.Style = Style.SECONDARY
)

Public properties

icon

val icon: Painter

Icon to display for the corner action button.

onClick

val onClick: () -> Unit

Callback invoked when the button is clicked.

style

open val style: CornerAction.Style

The visual style of the button. Defaults to Style.SECONDARY.

text

val text: String?

Optional accessibility description for screen readers.