File tree 2 files changed +20
-19
lines changed
quo2/components/selectors/disclaimer
status_im2/contexts/onboarding/create_password
2 files changed +20
-19
lines changed Original file line number Diff line number Diff line change 2
2
(:require [quo2.components.markdown.text :as text]
3
3
[quo2.components.selectors.disclaimer.style :as style]
4
4
[quo2.components.selectors.selectors.view :as selectors]
5
- [react-native.core :as rn]))
5
+ [react-native.core :as rn]
6
+ [reagent.core :as reagent]))
6
7
7
8
(defn view
8
- [{:keys [checked? blur? on-change accessibility-label container-style]} label]
9
- [rn/view
10
- {:style (merge container-style (style/container blur?))}
11
- [selectors/checkbox
12
- {:accessibility-label accessibility-label
13
- :blur? blur?
14
- :checked? checked?
15
- :on-change on-change}]
16
- [text/text
17
- {:size :paragraph-2
18
- :style style/text}
19
- label]])
9
+ [{:keys [blur? accessibility-label container-style]} label]
10
+ (let [checked? (reagent/atom false )]
11
+ (fn []
12
+ [rn/touchable-opacity {:on-press #(swap! checked? not)}
13
+ [rn/view {:style (merge container-style (style/container blur?))}
14
+ [selectors/checkbox
15
+ {:accessibility-label accessibility-label
16
+ :blur? blur?
17
+ :checked? @checked?
18
+ :on-change #(swap! checked? not)}]
19
+ [text/text
20
+ {:size :paragraph-2
21
+ :style style/text}
22
+ label]]])))
Original file line number Diff line number Diff line change 164
164
165
165
[rn/view {:style style/bottom-part}
166
166
[rn/view {:style style/disclaimer-container}
167
- [rn/touchable-opacity {:on-press #(swap! accepts-disclaimer? not)}
168
- [quo/disclaimer
169
- {:blur? true
170
- :on-change #(reset! accepts-disclaimer? %)
171
- :checked? @accepts-disclaimer?}
172
- (i18n/label :t/password-creation-disclaimer )]]]
167
+ [quo/disclaimer
168
+ {:blur? true
169
+ :checked? @accepts-disclaimer?}
170
+ (i18n/label :t/password-creation-disclaimer )]]
173
171
174
172
(when (= @focused-input :password )
175
173
[help
You can’t perform that action at this time.
0 commit comments