fix: jump-to button positioning (#19990)

fix: jump-to button positioning (#19990)
This commit is contained in:
Omar Basem 2024-05-15 08:49:33 +04:00 committed by GitHub
parent 9421b12412
commit c87e981902
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 33 additions and 25 deletions

View File

@ -13,3 +13,7 @@
{:padding-top 60 {:padding-top 60
:margin-bottom 12 :margin-bottom 12
:padding-horizontal 20}) :padding-horizontal 20})
(def shell-button
{:position :absolute
:bottom 12})

View File

@ -73,5 +73,4 @@
{:on-press #(rf/dispatch [:shell/navigate-to-jump-to]) {:on-press #(rf/dispatch [:shell/navigate-to-jump-to])
:customization-color customization-color :customization-color customization-color
:label (i18n/label :t/jump-to)}} :label (i18n/label :t/jump-to)}}
{:position :absolute style/shell-button]]))))
:bottom 0}]]))))

View File

@ -1,13 +1,17 @@
(ns status-im.contexts.wallet.home.style (ns status-im.contexts.wallet.home.style
(:require (:require
[quo.foundations.colors :as colors] [quo.foundations.colors :as colors]
[react-native.safe-area :as safe-area])) [react-native.safe-area :as safe-area]
[status-im.contexts.shell.jump-to.constants :as constants]))
(def tabs (def tabs
{:padding-horizontal 20 {:padding-horizontal 20
:padding-top 8 :padding-top 8
:padding-bottom 12}) :padding-bottom 12})
(def list-container
{:padding-bottom constants/floating-shell-button-height})
(def accounts-list (def accounts-list
{:padding-top 8 {:padding-top 8
:padding-bottom 16 :padding-bottom 16

View File

@ -86,25 +86,26 @@
[rn/view {:style (style/home-container)} [rn/view {:style (style/home-container)}
[common.top-nav/view] [common.top-nav/view]
[refreshable-flat-list/view [refreshable-flat-list/view
{:refresh-control [rn/refresh-control {:refresh-control [rn/refresh-control
{:refreshing (and tokens-loading? init-loaded?) {:refreshing (and tokens-loading? init-loaded?)
:colors [colors/neutral-40] :colors [colors/neutral-40]
:tint-color colors/neutral-40 :tint-color colors/neutral-40
:on-refresh #(rf/dispatch [:wallet/get-accounts])}] :on-refresh #(rf/dispatch [:wallet/get-accounts])}]
:header [rn/view {:style (style/header-container theme)} :header [rn/view {:style (style/header-container theme)}
[quo/wallet-overview [quo/wallet-overview
{:state (if tokens-loading? :loading :default) {:state (if tokens-loading? :loading :default)
:time-frame :none :time-frame :none
:metrics :none :metrics :none
:balance formatted-balance :balance formatted-balance
:networks networks :networks networks
:dropdown-on-press #(rf/dispatch [:show-bottom-sheet :dropdown-on-press #(rf/dispatch [:show-bottom-sheet
{:content network-filter/view}])}] {:content network-filter/view}])}]
(when (ff/enabled? ::ff/wallet.graph) (when (ff/enabled? ::ff/wallet.graph)
[quo/wallet-graph {:time-frame :empty}]) [quo/wallet-graph {:time-frame :empty}])
[render-cards cards account-list-ref] [render-cards cards account-list-ref]
[render-tabs tabs-data set-selected-tab selected-tab]] [render-tabs tabs-data set-selected-tab selected-tab]]
:sticky-header-indices [0] :content-container-style style/list-container
:data [] :sticky-header-indices [0]
:render-fn #() :data []
:footer [tabs/view {:selected-tab selected-tab}]}]])) :render-fn #()
:footer [tabs/view {:selected-tab selected-tab}]}]]))