#59 username textfield added
This commit is contained in:
parent
927b99c32a
commit
6ca65ba8b3
1 changed files with 17 additions and 0 deletions
|
@ -9,6 +9,7 @@ import androidx.compose.material.Text
|
|||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Email
|
||||
import androidx.compose.material.icons.filled.Lock
|
||||
import androidx.compose.material.icons.filled.Person
|
||||
import androidx.compose.runtime.*
|
||||
import be.ugent.sel.studeez.R.string as AppText
|
||||
import be.ugent.sel.studeez.R.drawable as AppIcon
|
||||
|
@ -35,6 +36,22 @@ fun BasicField(
|
|||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun UsernameField(
|
||||
value: String,
|
||||
onNewValue: (String) -> Unit,
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
OutlinedTextField(
|
||||
singleLine = true,
|
||||
modifier = modifier,
|
||||
value = value,
|
||||
onValueChange = { onNewValue(it) },
|
||||
placeholder = { Text(stringResource(AppText.username)) },
|
||||
leadingIcon = { Icon(imageVector = Icons.Default.Person, contentDescription = "Username") }
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun EmailField(
|
||||
value: String,
|
||||
|
|
Reference in a new issue