in android/source/src/main/kotlin/com/gu/source/components/buttons/SourceIconButton.kt [118:147]
fun SourceIconButton(
icon: ImageVector,
priority: SourceButton.Priority,
contentDescription: String?,
onClick: () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
size: SourceButton.Size = SourceButton.Size.Medium,
theme: Source.Theme? = null,
) {
val appliedTheme = theme ?: LocalSourceTheme.current
require(
!(appliedTheme == Source.Theme.ReaderRevenue && priority.isSecondary()),
) { ReaderRevenueSecondaryThemeErrorMessage }
SourceBaseIconButton(
size = size,
buttonColours = priority.toColours(appliedTheme),
onClick = onClick,
modifier = modifier,
enabled = enabled,
) {
Icon(
imageVector = icon,
contentDescription = contentDescription,
modifier = it,
)
}
}