From 431003e9370c392eed38a2b23d163c0687226263 Mon Sep 17 00:00:00 2001 From: Julien Eluard Date: Wed, 14 Mar 2018 10:52:18 +0100 Subject: [PATCH] [ISSUE #3511] Fixed incorrect styles on iOS Signed-off-by: Julien Eluard --- src/status_im/ui/components/text_field/styles.cljs | 13 ++----------- src/status_im/ui/components/text_field/view.cljs | 10 ++-------- .../ui/screens/add_new/new_public_chat/styles.cljs | 5 +---- 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/src/status_im/ui/components/text_field/styles.cljs b/src/status_im/ui/components/text_field/styles.cljs index a9fa4e71e7..e2a4fe95f8 100644 --- a/src/status_im/ui/components/text_field/styles.cljs +++ b/src/status_im/ui/components/text_field/styles.cljs @@ -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}) diff --git a/src/status_im/ui/components/text_field/view.cljs b/src/status_im/ui/components/text_field/view.cljs index 7891b1374d..56481a1bcb 100644 --- a/src/status_im/ui/components/text_field/view.cljs +++ b/src/status_im/ui/components/text_field/view.cljs @@ -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 diff --git a/src/status_im/ui/screens/add_new/new_public_chat/styles.cljs b/src/status_im/ui/screens/add_new/new_public_chat/styles.cljs index 864fda3700..e0c5c045a4 100644 --- a/src/status_im/ui/screens/add_new/new_public_chat/styles.cljs +++ b/src/status_im/ui/screens/add_new/new_public_chat/styles.cljs @@ -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