fix: `backup-recovery-phrase` check item pressability (#19705)

fix: `backup-recovery-phrase` check item pressability (#19705)
This commit is contained in:
Omar Basem 2024-04-18 21:33:56 +04:00 committed by GitHub
parent ac48fbef44
commit 2e2104d4d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 6 deletions

View File

@ -30,12 +30,18 @@
(defn- step-item
[item index _ {:keys [checked? customization-color]}]
[rn/view {:style style/step-item}
[quo/selectors
{:type :checkbox
:customization-color customization-color
:on-change #(swap! checked? assoc (keyword (str index)) %)}]
[quo/text {:style {:margin-left 12}} (i18n/label item)]])
(let [item-key (keyword (str index))
value (get @checked? item-key)]
[rn/pressable
{:style style/step-item
:hit-slop {:top 8 :bottom 8}
:on-press #(swap! checked? assoc item-key (not value))}
[quo/selectors
{:type :checkbox
:checked? value
:customization-color customization-color
:on-change #(swap! checked? assoc item-key %)}]
[quo/text {:style {:margin-left 12}} (i18n/label item)]]))
(defn view
[]