diff options
Diffstat (limited to 'ui-compose/src/main')
-rw-r--r-- | ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt b/ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt index 81255979..2bdf2de3 100644 --- a/ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt +++ b/ui-compose/src/main/kotlin/app/passwordstore/ui/compose/PasswordField.kt @@ -21,13 +21,14 @@ public fun PasswordField( value: String, label: String, initialVisibility: Boolean, + readOnly: Boolean, modifier: Modifier = Modifier, ) { var visible by remember { mutableStateOf(initialVisibility) } TextField( value = value, onValueChange = {}, - readOnly = true, + readOnly = readOnly, label = { Text(label) }, visualTransformation = if (visible) VisualTransformation.None else PasswordVisualTransformation(), |