Fix layout of title for select key-pairs screen (#20270)

* fix: ensure standard-title component uses flex-1 styling

* fix: adapt settings screens to use flex-0 styling for the standard-title component
This commit is contained in:
Sean Hagstrom 2024-06-05 14:59:35 +01:00 committed by GitHub
parent c0e10b7c6f
commit ec00ddf10e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 25 additions and 21 deletions

View File

@ -2,7 +2,8 @@
(:require [quo.foundations.colors :as colors])) (:require [quo.foundations.colors :as colors]))
(def container (def container
{:flex-direction :row {:flex 1
:flex-direction :row
:justify-content :space-between}) :justify-content :space-between})
(def right-counter (def right-counter

View File

@ -1,7 +1,8 @@
(ns status-im.contexts.settings.wallet.keypairs-and-accounts.style) (ns status-im.contexts.settings.wallet.keypairs-and-accounts.style)
(def title-container (def title-container
{:padding-horizontal 20 {:flex 0
:padding-horizontal 20
:margin-vertical 12}) :margin-vertical 12})
(defn page-wrapper (defn page-wrapper

View File

@ -106,11 +106,11 @@
:background :blur :background :blur
:icon-name :i/arrow-left :icon-name :i/arrow-left
:on-press navigate-back}] :on-press navigate-back}]
[rn/view {:style style/title-container}
[quo/standard-title [quo/standard-title
{:title (i18n/label :t/keypairs-and-accounts) {:title (i18n/label :t/keypairs-and-accounts)
:container-style style/title-container
:accessibility-label :keypairs-and-accounts-header :accessibility-label :keypairs-and-accounts-header
:customization-color customization-color}]] :customization-color customization-color}]
[rn/view {:style style/settings-keypairs-container} [rn/view {:style style/settings-keypairs-container}
(when (seq missing-keypairs) (when (seq missing-keypairs)
[quo/missing-keypairs [quo/missing-keypairs

View File

@ -2,7 +2,8 @@
(:require [quo.foundations.colors :as colors])) (:require [quo.foundations.colors :as colors]))
(def title-container (def title-container
{:padding-horizontal 20 {:flex 0
:padding-horizontal 20
:padding-vertical 12}) :padding-vertical 12})
(defn page-wrapper (defn page-wrapper

View File

@ -114,10 +114,10 @@
:background :blur :background :blur
:icon-name :i/arrow-left :icon-name :i/arrow-left
:on-press navigate-back}] :on-press navigate-back}]
[rn/view {:style style/title-container}
[quo/standard-title [quo/standard-title
{:title (i18n/label :t/network-settings) {:title (i18n/label :t/network-settings)
:accessibility-label :network-settings-header}]] :container-style style/title-container
:accessibility-label :network-settings-header}]
[rn/view {:style (style/settings-container (:bottom insets))} [rn/view {:style (style/settings-container (:bottom insets))}
(when networks-by-name (when networks-by-name
[rn/view {:style style/networks-container} [rn/view {:style style/networks-container}

View File

@ -1,7 +1,8 @@
(ns status-im.contexts.settings.wallet.saved-addresses.style) (ns status-im.contexts.settings.wallet.saved-addresses.style)
(def title-container (def title-container
{:padding-horizontal 20 {:flex 0
:padding-horizontal 20
:margin-top 12 :margin-top 12
:margin-bottom 16}) :margin-bottom 16})

View File

@ -78,14 +78,14 @@
:background :blur :background :blur
:icon-name :i/arrow-left :icon-name :i/arrow-left
:on-press navigate-back}] :on-press navigate-back}]
[rn/view {:style style/title-container}
[quo/standard-title [quo/standard-title
{:title (i18n/label :t/saved-addresses) {:title (i18n/label :t/saved-addresses)
:accessibility-label :saved-addresses-header :accessibility-label :saved-addresses-header
:right :action :right :action
:on-press add-address-to-save :on-press add-address-to-save
:customization-color customization-color :customization-color customization-color
:icon :i/add}]] :icon :i/add
:container-style style/title-container}]
[rn/section-list [rn/section-list
{:key-fn :title {:key-fn :title
:sticky-section-headers-enabled false :sticky-section-headers-enabled false