Skip to content

Commit f2cb030

Browse files
committed
chore: implement new style
1 parent 36f54a3 commit f2cb030

3 files changed

Lines changed: 15 additions & 6 deletions

File tree

app/src/main/java/to/bitkit/ui/components/TextInput.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import androidx.compose.foundation.text.KeyboardActions
88
import androidx.compose.foundation.text.KeyboardOptions
99
import androidx.compose.material3.Text
1010
import androidx.compose.material3.TextField
11+
import androidx.compose.material3.TextFieldColors
1112
import androidx.compose.runtime.Composable
1213
import androidx.compose.runtime.LaunchedEffect
1314
import androidx.compose.runtime.getValue
@@ -46,7 +47,8 @@ fun TextInput(
4647
supportingText: @Composable (() -> Unit)? = null,
4748
visualTransformation: VisualTransformation = VisualTransformation.None,
4849
textStyle: TextStyle = AppTextStyles.BodySSB,
49-
) {
50+
colors: TextFieldColors = AppTextFieldDefaults.semiTransparent,
51+
) {
5052
var textFieldValue by remember { mutableStateOf(TextFieldValue(value)) }
5153

5254
// Sync external changes
@@ -75,7 +77,7 @@ fun TextInput(
7577
maxLines = maxLines,
7678
minLines = minLines,
7779
singleLine = singleLine,
78-
colors = AppTextFieldDefaults.semiTransparent,
80+
colors = colors,
7981
shape = AppShapes.small,
8082
keyboardOptions = keyboardOptions,
8183
keyboardActions = keyboardActions,

app/src/main/java/to/bitkit/ui/screens/widgets/calculator/components/CalculatorCard.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ fun CalculatorCardContent(
101101
Box(
102102
modifier = modifier
103103
.clip(shape = MaterialTheme.shapes.medium)
104-
.background(Colors.White10)
104+
.background(Colors.Gray6)
105105
) {
106106
Column(
107107
modifier = Modifier

app/src/main/java/to/bitkit/ui/screens/widgets/calculator/components/CalculatorInput.kt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import androidx.compose.ui.unit.dp
2020
import to.bitkit.ui.components.BodyMSB
2121
import to.bitkit.ui.components.CaptionB
2222
import to.bitkit.ui.components.TextInput
23+
import to.bitkit.ui.theme.AppTextFieldDefaults
2324
import to.bitkit.ui.theme.AppThemeSurface
2425
import to.bitkit.ui.theme.Colors
2526

@@ -30,7 +31,7 @@ fun CalculatorInput(
3031
currencySymbol: String,
3132
currencyName: String,
3233
modifier: Modifier = Modifier,
33-
visualTransformation: VisualTransformation = VisualTransformation.None
34+
visualTransformation: VisualTransformation = VisualTransformation.None,
3435
) {
3536
TextInput(
3637
value = value,
@@ -39,7 +40,7 @@ fun CalculatorInput(
3940
leadingIcon = {
4041
Box(
4142
modifier = Modifier
42-
.background(color = Colors.White10, shape = CircleShape)
43+
.background(color = Colors.Gray6, shape = CircleShape)
4344
.size(32.dp),
4445
contentAlignment = Alignment.Center
4546
) {
@@ -50,6 +51,10 @@ fun CalculatorInput(
5051
keyboardType = KeyboardType.Number
5152
),
5253
suffix = { CaptionB(currencyName.uppercase(), color = Colors.Gray1) },
54+
colors = AppTextFieldDefaults.noIndicatorColors.copy(
55+
focusedContainerColor = Colors.Black,
56+
unfocusedContainerColor = Colors.Black
57+
),
5358
modifier = modifier,
5459
visualTransformation = visualTransformation
5560
)
@@ -60,7 +65,9 @@ fun CalculatorInput(
6065
private fun Preview() {
6166
AppThemeSurface {
6267
Column(
63-
modifier = Modifier.fillMaxSize().padding(16.dp),
68+
modifier = Modifier
69+
.fillMaxSize()
70+
.padding(16.dp),
6471
verticalArrangement = Arrangement.spacedBy(16.dp)
6572
) {
6673
CalculatorInput(

0 commit comments

Comments
 (0)