No need to have a SemanticColors parameter.
This commit is contained in:
parent
7b2352a3d0
commit
74618b9fc9
1 changed files with 4 additions and 6 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue