Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rasom committed Mar 28, 2019
1 parent 500ab04 commit 3fd4326
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
11 changes: 10 additions & 1 deletion src/status_im/ui/components/text_input/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,21 @@
[status-im.utils.platform :as platform]
[status-im.ui.components.tooltip.views :as tooltip]))

(defn merge-container-styles
[height container]
(let [merged-styles (merge (styles/input-container height) container)]
;; `:background-color` can't be nil; in this case the app will crash.
;; Nevertheless, we need to be able to remove background if necessary.
(if (nil? (:background-color merged-styles))
(dissoc merged-styles :background-color)
merged-styles)))

(defn text-input-with-label [{:keys [label content error style height container text] :as props}]
[react/view
(when label
[react/text {:style styles/label}
label])
[react/view {:style (merge (styles/input-container height) container)}
[react/view {:style (merge-container-styles height container)}
[react/text-input
(merge
{:style (merge styles/input style)
Expand Down
3 changes: 2 additions & 1 deletion src/status_im/ui/screens/browser/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@
{:should-component-update (fn [_ _ args]
(let [[_ props] args]
(not (nil? (:url props)))))}
[react/view {:flex 1}
[react/view {:flex 1
:elevation -10}
[react/view components.styles/flex
(if unsafe?
[site-blocked.views/view {:can-go-back? can-go-back?
Expand Down

0 comments on commit 3fd4326

Please sign in to comment.