Skip to content

Commit

Permalink
react switch warnings fix
Browse files Browse the repository at this point in the history
Signed-off-by: yenda <eric@status.im>
  • Loading branch information
flexsurfer authored and yenda committed Apr 23, 2019
1 parent 3134d1d commit 0d2be79
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/status_im/ui/screens/desktop/main/tabs/profile/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
[react/text {:style (assoc (styles/adv-settings-row-text colors/black)
:font-size 14)}
(i18n/label :t/logging-enabled)]
[react/switch {:on-tint-color colors/blue
[react/switch {:track-color #js {:true colors/blue :false nil}
:value logging-enabled
:on-value-change #(re-frame/dispatch [:log-level.ui/logging-enabled (not logging-enabled)])}]]
[react/view {:style (styles/adv-settings-row false)}
Expand Down Expand Up @@ -217,7 +217,7 @@
[react/text {:style styles/adv-settings-subtitle} (i18n/label :t/pfs)]
[react/view {:style (styles/profile-row false)}
[react/text {:style (styles/profile-row-text colors/black)} (i18n/label :t/pfs)]
[react/switch {:on-tint-color colors/blue
[react/switch {:track-color #js {:true colors/blue :false nil}
:value pfs?
:on-value-change #(re-frame/dispatch [:accounts.ui/toggle-pfs (not pfs?)])}]]])))

Expand Down Expand Up @@ -292,7 +292,7 @@
[share-contact-code]
[react/view {:style (styles/profile-row false)}
[react/text {:style (styles/profile-row-text colors/black)} (i18n/label :notifications)]
[react/switch {:on-tint-color colors/blue
[react/switch {:track-color #js {:true colors/blue :false nil}
:value notifications?
:on-value-change #(re-frame/dispatch [:accounts.ui/notifications-enabled (not notifications?)])}]]
[advanced-settings-item adv-settings-open?]
Expand Down
2 changes: 1 addition & 1 deletion src/status_im/ui/screens/pairing/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
;; Replacing therefore with checkbox until I have more time to investigate
(checkbox.views/checkbox {:checked? enabled?
:on-value-change (partial toggle-enabled! installation-id enabled?)})
[react/switch {:on-tint-color colors/blue
[react/switch {:track-color #js {:true colors/blue :false nil}
:value enabled?
:on-value-change (partial toggle-enabled! installation-id enabled?)}])]]])

Expand Down
2 changes: 1 addition & 1 deletion src/status_im/ui/screens/profile/components/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
[react/view styles/settings-item
[react/view styles/settings-item-text-wrapper
[react/i18n-text {:style styles/settings-item-text :key label-kw}]]
[react/switch {:on-tint-color colors/blue
[react/switch {:track-color #js {:true colors/blue :false nil}
:value (boolean value)
:on-value-change action-fn
:disabled (not active?)}]])

0 comments on commit 0d2be79

Please sign in to comment.