@Composable
fun AddNoteScreen() {
var login by remember{
mutableStateOf("")
}
var password by remember {
mutableStateOf("")
}
var repeatPassword by remember {
mutableStateOf("")
}
Column(
modifier= Modifier
.fillMaxSize()
.background(bac),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
//login
MainOutlinedTextField(onResult = { login = it })
//password
MainOutlinedTextField(onResult = { password = it })
//repeat password
MainOutlinedTextField(onResult = { repeatPassword = it })
}
}
@Composable
fun MainOutlinedTextField(onResult: (String) -> Unit){
OutlinedTextField(
value = valueUser,
onValueChange ={newText->
onResult(newText)
},
colors = TextFieldDefaults.outlinedTextFieldColors(
textColor = Color.White,
unfocusedBorderColor = main_blue,
focusedBorderColor = faded_blue
),
label = {
Text(
text = "Имя заметки",
color = faded_blue,
fontSize = 10.sp
)
},
leadingIcon = {
IconButton(onClick = { }) {
Icon(
imageVector = Icons.Filled.Edit,
contentDescription = null,
tint = faded_blue
)
}
},
singleLine = true,
keyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Ascii,
imeAction = ImeAction.Go
),
)
}