Update on-press on collectible component (#16837)

This commit adds the "on-press" prop to the "collectible" component which is required for navigating to other screens, such as the details screen when we will start building the wallet.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit is contained in:
Mohamed Javid 2023-08-03 16:58:14 +08:00 committed by GitHub
parent b0e45207df
commit cccf5ed015
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -91,7 +91,9 @@
[remaining-tiles (- (count remaining-images) 3)]])]]))))
(defn collectible
[{:keys [images]}]
[{:keys [images on-press]}]
[rn/view {:style style/tile-outer-container}
[rn/view {:style style/tile-inner-container}
[rn/pressable
{:on-press on-press
:style style/tile-inner-container}
[tile-container {:images images}]]])

View File

@ -36,7 +36,9 @@
[rn/view
{:padding-vertical 100
:align-items :center}
[quo/collectible {:images images-to-show}]]]))))
[quo/collectible
{:images images-to-show
:on-press #(js/alert "Pressed")}]]]))))
(defn preview-collectible
[]