@@ -51,11 +51,12 @@ object BigIcon {
5151 *
5252 * @param vectorIcon the [ImageVector] to display
5353 * @param contentDescription the content description of the icon, if any. It defaults to `null`
54+ * @param useCriticalTint whether the icon and background should be rendered using critical tint
5455 */
5556 data class Default (
5657 val vectorIcon : ImageVector ,
5758 val contentDescription : String? = null ,
58- val destructive : Boolean = false ,
59+ val useCriticalTint : Boolean = false ,
5960 ) : Style
6061
6162 /* *
@@ -91,7 +92,7 @@ object BigIcon {
9192 modifier : Modifier = Modifier ,
9293 ) {
9394 val backgroundColor = when (style) {
94- is Style .Default -> if (style.destructive ) {
95+ is Style .Default -> if (style.useCriticalTint ) {
9596 ElementTheme .colors.bgCriticalSubtle
9697 } else {
9798 ElementTheme .colors.bgSubtleSecondary
@@ -116,7 +117,7 @@ object BigIcon {
116117 Style .SuccessSolid -> stringResource(CommonStrings .common_success)
117118 }
118119 val iconTint = when (style) {
119- is Style .Default -> if (style.destructive ) {
120+ is Style .Default -> if (style.useCriticalTint ) {
120121 ElementTheme .colors.iconCriticalPrimary
121122 } else {
122123 ElementTheme .colors.iconSecondary
@@ -170,7 +171,7 @@ internal class BigIconStyleProvider : PreviewParameterProvider<BigIcon.Style> {
170171 BigIcon .Style .Default (Icons .Filled .CatchingPokemon ),
171172 BigIcon .Style .Alert ,
172173 BigIcon .Style .AlertSolid ,
173- BigIcon .Style .Default (Icons .Filled .CatchingPokemon , destructive = true ),
174+ BigIcon .Style .Default (Icons .Filled .CatchingPokemon , useCriticalTint = true ),
174175 BigIcon .Style .Success ,
175176 BigIcon .Style .SuccessSolid
176177 )
0 commit comments