Merge pull request #5663 from status-im/fix/desktop-signin

Fix desktop signin text input field
This commit is contained in:
Vitaliy Vlasov 2018-08-29 12:35:05 +03:00 committed by GitHub
commit c1bb9278bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -2,6 +2,7 @@
(:require [status-im.ui.components.react :as react]
[status-im.ui.components.text-input.styles :as styles]
[status-im.ui.components.colors :as colors]
[status-im.utils.platform :as platform]
[status-im.ui.components.tooltip.views :as tooltip]))
(defn text-input-with-label [{:keys [label content error style height container text] :as props}]
@ -15,9 +16,12 @@
{:style (merge styles/input style)
:placeholder-text-color colors/gray
:auto-focus true
:value text
:auto-capitalize :none}
(dissoc props :style :height))]
(dissoc props :style :height)
;; Workaround until `value` TextInput field is available on desktop:
;; https://github.com/status-im/react-native-desktop/issues/320
(when-not platform/desktop?
{:value text}))]
(when content content)]
(when error
[tooltip/tooltip error (styles/error label)])])