Skip to content

Commit

Permalink
Use default roundedcorner for the RandomPinInput
Browse files Browse the repository at this point in the history
  • Loading branch information
greenart7c3 committed Nov 1, 2024
1 parent b9b9192 commit 1079f71
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
import androidx.compose.foundation.lazy.grid.itemsIndexed
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.Backspace
import androidx.compose.material.icons.filled.Backspace
import androidx.compose.material.icons.filled.Done
import androidx.compose.material.icons.filled.Visibility
import androidx.compose.material.icons.filled.VisibilityOff
Expand Down Expand Up @@ -115,6 +115,7 @@ fun RandomPinInput(
) {
itemsIndexed(randomNumbers.dropLast(1)) { _, number ->
Button(
shape = RoundedCornerShape(20),
onClick = {
if (selectedPin.length < 6) {
selectedPin += number.toString()
Expand All @@ -128,6 +129,7 @@ fun RandomPinInput(

item {
Button(
shape = RoundedCornerShape(20),
onClick = {
if (selectedPin.isNotEmpty()) {
selectedPin = selectedPin.dropLast(1) // Remove last digit
Expand All @@ -145,6 +147,7 @@ fun RandomPinInput(

item {
Button(
shape = RoundedCornerShape(20),
onClick = {
if (selectedPin.length < 6) {
selectedPin += randomNumbers.last().toString()
Expand All @@ -158,6 +161,7 @@ fun RandomPinInput(

item {
Button(
shape = RoundedCornerShape(20),
enabled = selectedPin.length >= 4,
onClick = {
if (selectedPin.length >= 4) {
Expand Down

0 comments on commit 1079f71

Please sign in to comment.