Skip to content

Commit bdcc91f

Browse files
committed
style(fc): add success to colorScheme; drive success checkmarks in CodeButton and SlideToConfirm
Signed-off-by: Brandon McAnsh <[email protected]>
1 parent 193dddc commit bdcc91f

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

flipchatApp/src/main/kotlin/xyz/flipchat/app/theme/FlipchatTheme.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ private val colors = ColorScheme(
3939
onSurface = White,
4040
error = Error,
4141
errorText = Alert,
42+
success = FC_Accent,
4243
textMain = TextMain,
4344
textSecondary = FC_TextWithPrimary,
4445
divider = FC_Secondary,

ui/components/src/main/kotlin/com/getcode/ui/components/SlideToConfirm.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ import androidx.compose.ui.Alignment
5454
import androidx.compose.ui.Modifier
5555
import androidx.compose.ui.draw.alpha
5656
import androidx.compose.ui.graphics.Color
57+
import androidx.compose.ui.graphics.ColorFilter
5758
import androidx.compose.ui.graphics.Shape
5859
import androidx.compose.ui.graphics.lerp
5960
import androidx.compose.ui.hapticfeedback.HapticFeedbackType
@@ -224,6 +225,7 @@ fun SlideToConfirm(
224225
Image(
225226
painter = painterResource(id = R.drawable.ic_check),
226227
contentDescription = "",
228+
colorFilter = ColorFilter.tint(CodeTheme.colors.success),
227229
modifier = Modifier
228230
.size(CodeTheme.dimens.grid.x4)
229231
.align(Alignment.Center),

ui/components/src/main/kotlin/com/getcode/ui/theme/CodeButton.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ fun CodeButton(
138138
Icon(
139139
modifier = Modifier.requiredSize(CodeTheme.dimens.grid.x3),
140140
painter = painterResource(id = R.drawable.ic_check),
141-
tint = Color.Unspecified,
141+
tint = CodeTheme.colors.success,
142142
contentDescription = "",
143143
)
144144
}

ui/theme/src/main/kotlin/com/getcode/theme/Theme.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ internal val CodeDefaultColorScheme = ColorScheme(
3737
onSurface = White,
3838
error = Error,
3939
errorText = TextError,
40+
success = Success,
4041
textMain = TextMain,
4142
textSecondary = TextSecondary,
4243
divider = White10,
@@ -111,6 +112,7 @@ class ColorScheme(
111112
dividerVariant: Color,
112113
error: Color,
113114
errorText: Color,
115+
success: Color,
114116
textMain: Color,
115117
textSecondary: Color,
116118
trackColor: Color,
@@ -143,6 +145,8 @@ class ColorScheme(
143145
private set
144146
var errorText by mutableStateOf(errorText)
145147
private set
148+
var success by mutableStateOf(success)
149+
private set
146150
var textMain by mutableStateOf(textMain)
147151
private set
148152
var textSecondary by mutableStateOf(textSecondary)
@@ -179,6 +183,7 @@ class ColorScheme(
179183
onSurface = other.onSurface
180184
error = other.error
181185
errorText = other.errorText
186+
success = other.success
182187
textMain = other.textMain
183188
textSecondary = other.textSecondary
184189
secondary = other.secondary
@@ -206,6 +211,7 @@ class ColorScheme(
206211
onSurface = onSurface,
207212
error = error,
208213
errorText = errorText,
214+
success = success,
209215
textMain = textMain,
210216
textSecondary = textSecondary,
211217
secondary = secondary,

0 commit comments

Comments
 (0)