mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:01:40 +00:00
No need to have a SemanticColors parameter.
This commit is contained in:
+4
-6
@@ -38,7 +38,6 @@ import io.element.android.libraries.designsystem.theme.components.Icon
|
|||||||
import io.element.android.libraries.designsystem.theme.iconSuccessPrimaryBackground
|
import io.element.android.libraries.designsystem.theme.iconSuccessPrimaryBackground
|
||||||
import io.element.android.libraries.designsystem.utils.CommonDrawables
|
import io.element.android.libraries.designsystem.utils.CommonDrawables
|
||||||
import io.element.android.libraries.theme.ElementTheme
|
import io.element.android.libraries.theme.ElementTheme
|
||||||
import io.element.android.libraries.theme.compound.generated.SemanticColors
|
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
internal fun FormattingOption(
|
internal fun FormattingOption(
|
||||||
@@ -47,18 +46,17 @@ internal fun FormattingOption(
|
|||||||
imageVector: ImageVector,
|
imageVector: ImageVector,
|
||||||
contentDescription: String?,
|
contentDescription: String?,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
colors: SemanticColors = ElementTheme.colors,
|
|
||||||
) {
|
) {
|
||||||
val backgroundColor = when (state) {
|
val backgroundColor = when (state) {
|
||||||
FormattingOptionState.Selected -> colors.iconSuccessPrimaryBackground
|
FormattingOptionState.Selected -> ElementTheme.colors.iconSuccessPrimaryBackground
|
||||||
FormattingOptionState.Default,
|
FormattingOptionState.Default,
|
||||||
FormattingOptionState.Disabled -> Color.Transparent
|
FormattingOptionState.Disabled -> Color.Transparent
|
||||||
}
|
}
|
||||||
|
|
||||||
val foregroundColor = when (state) {
|
val foregroundColor = when (state) {
|
||||||
FormattingOptionState.Selected -> colors.iconSuccessPrimary
|
FormattingOptionState.Selected -> ElementTheme.colors.iconSuccessPrimary
|
||||||
FormattingOptionState.Default -> colors.iconSecondary
|
FormattingOptionState.Default -> ElementTheme.colors.iconSecondary
|
||||||
FormattingOptionState.Disabled -> colors.iconDisabled
|
FormattingOptionState.Disabled -> ElementTheme.colors.iconDisabled
|
||||||
}
|
}
|
||||||
Box(
|
Box(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
|
|||||||
Reference in New Issue
Block a user