Icon Button
fun IconButton(iconPainter: Painter, onClick: () -> Unit, modifier: Modifier = Modifier, buttonType: ButtonType = ButtonType.Primary, isEnabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })
Icon button
Buttons are used to initialize an action. Button labels express what action will occur when the user interacts with it.
Icon buttons allow users to take actions, and make choices, with a single tap. Icon buttons can take the form of a primary, secondary, tertiary, or ghost variant but most commonly will be styled as primary or ghost buttons.
(From Button documentation)
Parameters
icon Painter
Icon painter to be displayed in the button.
on Click
Callback invoked when the button is clicked.
modifier
The modifier to be applied to the button.
button Type
A ButtonType that defines the button's type.
is Enabled
Whether the button is enabled or disabled.
interaction Source
The MutableInteractionSource that keeps track of the button's state.