[ISSUE #3511] Fixed incorrect styles on iOS

Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
Julien Eluard 2018-03-14 10:52:18 +01:00
parent c023122ca5
commit 431003e937
No known key found for this signature in database
GPG Key ID: 6FD7DB5437FCBEF6
3 changed files with 5 additions and 23 deletions

View File

@ -2,17 +2,11 @@
(:require-macros [status-im.utils.styles :refer [defnstyle]]))
(def text-field-container
{:position :relative
:height 72
:padding-top 30
:padding-bottom 34})
{:padding-top 2})
(def text-input
{:font-size 16
:height 34
:line-height 34
:padding-bottom 5
:text-align-vertical :top})
:text-align-vertical :center})
(defnstyle label [top font-size color]
{:position :absolute
@ -23,9 +17,6 @@
:ios {:left 0}
:android {:left 4}})
(def label-float
{})
(defn underline-container [background-color]
{:background-color background-color
:align-items :center})

View File

@ -105,14 +105,12 @@
valid-value
temp-value
max-length]} (reagent/state component)
{:keys [wrapper-style input-style label-hidden? line-color focus-line-color focus-line-height
{:keys [wrapper-style input-style label-hidden? focus-line-height
secure-text-entry label-color error-color error label value on-focus on-blur validator
auto-focus on-change-text on-change on-end-editing on-submit-editing editable placeholder
placeholder-text-color auto-capitalize multiline number-of-lines]}
(merge default-props (reagent/props component))
valid-value (or valid-value "")
line-color (if error error-color line-color)
focus-line-color (if error error-color focus-line-color)
label-color (if (and error (not float-label?)) error-color label-color)
label (when-not label-hidden?
(if error (str label " *") label))]
@ -163,11 +161,7 @@
:max-length max-length
:on-submit-editing #(do (.blur @input-ref) (when on-submit-editing (on-submit-editing)))
:on-end-editing (when on-end-editing on-end-editing)
:auto-focus (true? auto-focus)}]
[react/view {:style (styles/underline-container line-color)
:onLayout #(reagent/set-state component {:max-line-width (get-width %)})}
[react/animated-view {:style (styles/underline focus-line-color line-width line-height)}]]
[react/text {:style (styles/error-text error-color)} error]]))
:auto-focus (true? auto-focus)}]]))
(defn text-field [_ _]
(let [component-data {:get-initial-state get-initial-state

View File

@ -27,10 +27,7 @@
{:margin-left 14}))
(def group-chat-name-wrapper
{:flex 1
:padding-top 0
:height 40
:padding-bottom 0})
{:flex 1})
(def group-container
{:flex 1