Icon in BigIcon have a iconPrimary color according to Figma.

This commit is contained in:
Benoit Marty
2026-09-30 14:53:06 +02:00
parent 485f71c824
commit 1ac63ebec5
6 changed files with 5 additions and 10 deletions
@@ -32,6 +32,8 @@ import io.element.android.libraries.designsystem.theme.components.Text
/**
* IconTitleSubtitleMolecule is a molecule which displays an icon, a title and a subtitle.
*
* Ref: https://www.figma.com/design/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?node-id=1964-3385
*
* @param title the title to display
* @param subTitle the subtitle to display
* @param iconStyle the style of the [BigIcon] to display
@@ -53,13 +53,11 @@ object BigIcon {
* @param vectorIcon the [ImageVector] to display
* @param contentDescription the content description of the icon, if any. It defaults to `null`
* @param useCriticalTint whether the icon and background should be rendered using critical tint
* @param usePrimaryTint whether the icon should be rendered using primary tint
*/
data class Default(
val vectorIcon: ImageVector,
val contentDescription: String? = null,
val useCriticalTint: Boolean = false,
val usePrimaryTint: Boolean = false,
) : Style
/**
@@ -129,10 +127,8 @@ object BigIcon {
val iconTint = when (style) {
is Style.Default -> if (style.useCriticalTint) {
ElementTheme.colors.iconCriticalPrimary
} else if (style.usePrimaryTint) {
ElementTheme.colors.iconPrimary
} else {
ElementTheme.colors.iconSecondary
ElementTheme.colors.iconPrimary
}
Style.Alert,
Style.AlertSolid -> ElementTheme.colors.iconCriticalPrimary
@@ -71,7 +71,6 @@ fun MediaFileView(
modifier = Modifier.align(Alignment.CenterHorizontally),
style = BigIcon.Style.Default(
vectorIcon = icon,
usePrimaryTint = true,
),
)
if (info != null) {