Skip to content

Commit

Permalink
Provide global customization color to buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
tumanov-alex committed Oct 31, 2023
1 parent d9065e3 commit f0695f4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion src/status_im/ui/screens/wallet/address_add_edit/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
(defn- view-internal
[]
(let [{:keys [accounts-count address]} (rf/sub [:get-screen-params])
{:keys [customization-color]} (rf/sub [:profile/multiaccount])
account-name (reagent/atom (str "Account " accounts-count))
address-title (i18n/label :t/watch-address)
account-color (reagent/atom :purple)
account-color (reagent/atom customization-color)
account-emoji (reagent/atom (emoji-picker.utils/random-emoji))
on-change-name #(reset! account-name %)
on-change-color #(reset! account-color %)
Expand Down
22 changes: 12 additions & 10 deletions src/status_im2/contexts/wallet/address_watch/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@

(defn view-internal
[]
(let [top (safe-area/get-top)
bottom (safe-area/get-bottom)
input-value (reagent/atom "")
{:keys [accounts-count]} (rf/sub [:get-screen-params])]
(let [top (safe-area/get-top)
bottom (safe-area/get-bottom)
input-value (reagent/atom "")
{:keys [accounts-count]} (rf/sub [:get-screen-params])
{:keys [customization-color]} (rf/sub [:profile/multiaccount])]
(fn []
[rn/view
{:style {:flex 1
Expand Down Expand Up @@ -45,11 +46,12 @@
{:icon-only? true
:type :outline} :i/scan]]
[quo/button
{:disabled? (clojure.string/blank? @input-value)
:on-press #(re-frame/dispatch [:navigate-to
:address-to-watch-edit
{:accounts-count accounts-count
:address @input-value}])
:container-style (style/button-container bottom)} (i18n/label :t/continue)]])))
{:customization-color customization-color
:disabled? (clojure.string/blank? @input-value)
:on-press #(re-frame/dispatch [:navigate-to
:address-to-watch-edit
{:accounts-count accounts-count
:address @input-value}])
:container-style (style/button-container bottom)} (i18n/label :t/continue)]])))

(def view (quo.theme/with-theme view-internal))

0 comments on commit f0695f4

Please sign in to comment.