in android/source/src/main/kotlin/com/gu/source/components/buttons/SourceButton.kt [153:178]
fun SourceContentButton(
size: SourceButton.Size,
priority: SourceButton.Priority,
onClick: () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
theme: Source.Theme? = null,
content: @Composable () -> Unit,
) {
val appliedTheme = theme ?: LocalSourceTheme.current
require(
!(appliedTheme == Source.Theme.ReaderRevenue && priority.isSecondary()),
) { "ReaderRevenue theme doesn't have secondary buttons." }
val buttonColours = priority.toColours(appliedTheme)
PlainSourceContentButton(
size = size,
onClick = onClick,
modifier = modifier,
enabled = enabled,
buttonColours = buttonColours,
content = content,
)
}