KwikFloatingActionButton

fun KwikFloatingActionButton(modifier: Modifier = Modifier, contentColor: Color = MaterialTheme.colorScheme.onPrimary, containerColor: Color = MaterialTheme.colorScheme.primary, shape: Shape = FloatingActionButtonDefaults.extendedFabShape, elevation: FloatingActionButtonElevation = FloatingActionButtonDefaults.elevation(), interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, loading: Boolean = false, loadingText: String? = null, enabled: Boolean = true, onClick: () -> Unit, content: @Composable () -> Unit)

A floating action button that can be customized to suit different use cases.

Parameters

modifier

Modifier to be applied to the button.

containerColor

The color of the button.

contentColor

The color of the icon.

shape

The shape of the button.

loading

Whether the button is in a loading state.

loadingText

The text to be displayed when the button is in a loading state.

enabled

Whether the button is enabled.

elevation

The elevation of the button.

interactionSource

The interaction source of the button.

onClick

The action to be performed when the button is clicked.

content

The content of the button.

Example usage:

KwikExtendedFloatingActionButton(
text = { Text(text = "Action", style = MaterialTheme.typography.titleSmall) },
icon = { Icon(Icons.Sharp.Share, tint = Color.White, contentDescription = "share") },
containerColor = MaterialTheme.colorScheme.primary,
onClick = { /* Do something */}
)