(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,15 +5,17 @@
[react-native.core :as rn]))
(defn view
[{:keys [checked? blur? on-change accessibility-label container-style]} label]
[rn/view
{:style (merge container-style (style/container blur?))}
[selectors/checkbox
{:accessibility-label accessibility-label
:blur? blur?
:checked? checked?
:on-change on-change}]
[text/text
{:size :paragraph-2
:style style/text}
label]])
[{:keys [checked? blur? accessibility-label container-style on-change]} label]
[rn/touchable-opacity
{:on-press on-change
:accessibility-label "disclaimer-touchable-opacity"}
[rn/view {:style (merge container-style (style/container blur?))}
[selectors/checkbox
{:accessibility-label accessibility-label
:blur? blur?
:checked? checked?
:on-change on-change}]
[text/text
{:size :paragraph-2
:style style/text}
label]]])

View File

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