Skip to content

Commit

Permalink
Merge pull request #104 from getspherelabs/99-validationsignin
Browse files Browse the repository at this point in the history
 Use validation module in # screen #99
  • Loading branch information
behzodhalil authored Oct 9, 2023
2 parents 344399c + 05d1041 commit 445d206
Show file tree
Hide file tree
Showing 28 changed files with 751 additions and 553 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,118 +22,119 @@ import androidx.compose.ui.unit.sp

@Composable
fun LKNewItemButton(
contentText: String,
contentFontFamily: FontFamily,
modifier: Modifier = Modifier,
borderColor: Color = Color.Cyan,
backgroundColor: Color = Color.White,
contentColor: Color = Color.Black,
iconColor: Color = Color.Black,
onNewItemClick: () -> Unit,
contentText: String,
contentFontFamily: FontFamily,
modifier: Modifier = Modifier,
borderColor: Color = Color.Cyan,
backgroundColor: Color = Color.White,
contentColor: Color = Color.Black,
iconColor: Color = Color.Black,
onNewItemClick: () -> Unit,
) {
Button(
modifier = modifier,
border = BorderStroke(1.dp, borderColor),
colors = ButtonDefaults.buttonColors(backgroundColor = backgroundColor),
shape = RoundedCornerShape(16.dp),
onClick = { onNewItemClick.invoke() },
) {
Text(
text = contentText,
color = contentColor,
fontSize = 14.sp,
fontFamily = contentFontFamily,
fontWeight = FontWeight.Medium,
)
Button(
modifier = modifier,
border = BorderStroke(1.dp, borderColor),
colors = ButtonDefaults.buttonColors(backgroundColor = backgroundColor),
shape = RoundedCornerShape(16.dp),
onClick = { onNewItemClick.invoke() },
) {
Text(
text = contentText,
color = contentColor,
fontSize = 14.sp,
fontFamily = contentFontFamily,
fontWeight = FontWeight.Medium,
)

Icon(
modifier = modifier.size(14.dp),
imageVector = Icons.Default.Add,
contentDescription = null,
tint = iconColor,
)
}
Icon(
modifier = modifier.size(14.dp),
imageVector = Icons.Default.Add,
contentDescription = null,
tint = iconColor,
)
}
}

@Composable
fun LKBackButton(
text: String,
backgroundColor: Color = Color.Yellow,
modifier: Modifier = Modifier,
onButtonClick: () -> Unit,
text: String,
backgroundColor: Color = Color.Yellow,
modifier: Modifier = Modifier,
onButtonClick: () -> Unit,
) {
Box(
modifier =
modifier
.width(75.dp)
.height(32.dp)
.clip(RoundedCornerShape(24.dp))
.clickable { onButtonClick.invoke() }
.background(color = backgroundColor),
) {
Row(
modifier = modifier.fillMaxSize(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center,
Box(
modifier =
modifier
.width(75.dp)
.height(32.dp)
.clip(RoundedCornerShape(24.dp))
.clickable { onButtonClick.invoke() }
.background(color = backgroundColor),
) {
Icon(
modifier = modifier.size(12.dp),
imageVector = Icons.Outlined.ArrowBackIos,
contentDescription = null,
)
Spacer(modifier = modifier.width(4.dp))
Text(text, fontSize = 12.sp)
Row(
modifier = modifier.fillMaxSize(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center,
) {
Icon(
modifier = modifier.size(12.dp),
imageVector = Icons.Outlined.ArrowBackIos,
contentDescription = null,
)
Spacer(modifier = modifier.width(4.dp))
Text(text, fontSize = 12.sp)
}
}
}
}

@Composable
fun LKUseButton(
text: String,
backgroundColor: Color = Color.Yellow,
modifier: Modifier = Modifier,
onButtonClick: () -> Unit,
text: String,
backgroundColor: Color = Color.Yellow,
modifier: Modifier = Modifier,
onButtonClick: () -> Unit,
) {
Box(
modifier =
modifier
.width(75.dp)
.height(32.dp)
.clip(RoundedCornerShape(24.dp))
.background(color = backgroundColor),
) {
Row(
modifier = modifier.fillMaxSize(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center,
Box(
modifier =
modifier
.width(75.dp)
.height(32.dp)
.clip(RoundedCornerShape(24.dp))
.background(color = backgroundColor),
) {
Text(text, fontSize = 12.sp)
Spacer(modifier = modifier.width(4.dp))
Icon(
modifier = modifier.size(12.dp),
imageVector = Icons.Outlined.ArrowForwardIos,
contentDescription = null,
)
Row(
modifier = modifier.fillMaxSize(),
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.Center,
) {
Text(text, fontSize = 12.sp)
Spacer(modifier = modifier.width(4.dp))
Icon(
modifier = modifier.size(12.dp),
imageVector = Icons.Outlined.ArrowForwardIos,
contentDescription = null,
)
}
}
}
}

@Composable
fun LKNumberButton(
value: String,
fontFamily: FontFamily,
modifier: Modifier = Modifier,
onClick: () -> Unit,
value: String,
fontFamily: FontFamily,
modifier: Modifier = Modifier,
onClick: () -> Unit,
) {
Box(
modifier = modifier.size(55.dp).clickable { onClick.invoke() },
contentAlignment = Alignment.Center,
) {
Text(
text = value,
color = Color.White,
style = MaterialTheme.typography.h4,
fontFamily = fontFamily,
)
}
Box(
modifier = modifier.size(55.dp).clickable { onClick.invoke() },
contentAlignment = Alignment.Center,
) {
Text(
text = value,
color = Color.White,
style = MaterialTheme.typography.h4,
fontFamily = fontFamily,
fontWeight = FontWeight.Medium,
)
}
}
Loading

0 comments on commit 445d206

Please # to comment.