SourceButton

fun SourceButton(text: String, priority: SourceButton.Priority, onClick: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, size: SourceButton.Size = SourceButton.Size.Small, theme: Source.Theme? = null, iconSide: SourceButton.IconSide = SourceButton.IconSide.Left, icon: @Composable (Modifier) -> Unit = {})

A Source button component with text and an optional icon.

Parameters

text

Text to display on the button.

priority

Button priority from SourceButton.Prioritys. Informs users of how important an action is.

onClick

Callback for action to take when user clicks the button.

modifier

Optional Modifier

enabled

Whether the button is enabled and can be interacted with.

size

Optional button size from SourceButton.Sizes. Reflects the prominence of the action. Defaults to SourceButton.Size.Small.

theme

Optional Source.Theme to apply to the button. If not provided, the current theme from LocalSourceTheme will be used.

Unless using the button as a standalone component, it is recommended to wrap the whole screen/sheet with SourceCoreTheme or ReaderRevenueTheme to provide consistent theme to all child components once.

iconSide

Optional the side of the button on which the icon appears. Defaults to SourceButton.IconSide.Left.

icon

Optional icon to display on the button.