(fix) modify disclaimer component for on tap UX (#15757)

This commit is contained in:
Siddarth Kumar 2023-05-02 15:55:49 +05:30 committed by GitHub
parent 51b9253734
commit fac368521b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 13 deletions

View File

@ -5,9 +5,11 @@
[react-native.core :as rn])) [react-native.core :as rn]))
(defn view (defn view
[{:keys [checked? blur? on-change accessibility-label container-style]} label] [{:keys [checked? blur? accessibility-label container-style on-change]} label]
[rn/view [rn/touchable-opacity
{:style (merge container-style (style/container blur?))} {:on-press on-change
:accessibility-label "disclaimer-touchable-opacity"}
[rn/view {:style (merge container-style (style/container blur?))}
[selectors/checkbox [selectors/checkbox
{:accessibility-label accessibility-label {:accessibility-label accessibility-label
:blur? blur? :blur? blur?
@ -16,4 +18,4 @@
[text/text [text/text
{:size :paragraph-2 {:size :paragraph-2
:style style/text} :style style/text}
label]]) label]]])

View File

@ -166,7 +166,7 @@
[rn/view {:style style/disclaimer-container} [rn/view {:style style/disclaimer-container}
[quo/disclaimer [quo/disclaimer
{:blur? true {:blur? true
:on-change #(reset! accepts-disclaimer? %) :on-change #(swap! accepts-disclaimer? not)
:checked? @accepts-disclaimer?} :checked? @accepts-disclaimer?}
(i18n/label :t/password-creation-disclaimer)]] (i18n/label :t/password-creation-disclaimer)]]