Button
fun Button(label: String, onClick: () -> Unit, modifier: Modifier = Modifier, value: String? = null, style: ButtonStyle = LocalButtonStyle.current, spacing: ButtonSpacing = ButtonSpacing.Packed, icons: ButtonIcons? = null, enabled: Boolean = true, loading: Boolean = false, indication: Indication? = LocalIndication.current, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClickLabel: String? = null, motion: Motion<ButtonMotionStyle> = rememberButtonMotion(
motionContext = rememberMotionContext(interactionSource),
))
Кнопка с текстом и иконкой. Если loading == true, кнопка отобразит круглый индикатор загрузки. Кнопка умеет отобрать иконки в начале и в конце.
Parameters
label
текст кнопки
on Click
обработчик нажатий
modifier
модификатор
style
стиль кнопки
value
доп. текст кнопки
icons
иконки
enabled
флаг доступности кнопки
loading
флаг загрузки
interaction Source
источник взаимодействий MutableInteractionSource
on Click Label
надпись для Accessibility
motion
объект анимаций