[Fix] Move category selector height to emoji picker (#17844)
This commit moves the emoji categories selector height from the "showcase-nav" component to the "emoji-picker" as we should not use any "quo" ns (except "quo.core") inside the "status-im2" ns. Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
This commit is contained in:
parent
e573fc914a
commit
595b1cfc40
|
@ -2,11 +2,6 @@
|
||||||
(:require
|
(:require
|
||||||
[quo.foundations.colors :as colors]))
|
[quo.foundations.colors :as colors]))
|
||||||
|
|
||||||
(def height 56)
|
|
||||||
|
|
||||||
(def root-container
|
|
||||||
{:height height})
|
|
||||||
|
|
||||||
(defn container
|
(defn container
|
||||||
[state theme]
|
[state theme]
|
||||||
{:padding-top 12
|
{:padding-top 12
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
(defn- view-internal
|
(defn- view-internal
|
||||||
[{:keys [theme container-style default-active state data on-press active-id]}]
|
[{:keys [theme container-style default-active state data on-press active-id]}]
|
||||||
[rn/view
|
[rn/view
|
||||||
{:style (merge style/root-container container-style)
|
{:style container-style
|
||||||
:accessibility-label :showcase-nav}
|
:accessibility-label :showcase-nav}
|
||||||
[rn/flat-list
|
[rn/flat-list
|
||||||
{:data data
|
{:data data
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
(def ^:const emoji-row-separator-height 16)
|
(def ^:const emoji-row-separator-height 16)
|
||||||
|
|
||||||
|
(def ^:const categories-selector-height 56)
|
||||||
|
|
||||||
(def ^:const emoji-item-margin-right
|
(def ^:const emoji-item-margin-right
|
||||||
(/ (- (:width (rn/get-window))
|
(/ (- (:width (rn/get-window))
|
||||||
(* emoji-row-padding-horizontal 2)
|
(* emoji-row-padding-horizontal 2)
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
(ns status-im2.contexts.emoji-picker.style
|
(ns status-im2.contexts.emoji-picker.style
|
||||||
(:require
|
(:require
|
||||||
[quo.components.profile.showcase-nav.style :as showcase-nav.style]
|
|
||||||
[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-im2.contexts.emoji-picker.constants :as constants]))
|
[status-im2.contexts.emoji-picker.constants :as constants]))
|
||||||
|
|
||||||
(def flex-spacer {:flex 1})
|
(def flex-spacer {:flex 1})
|
||||||
|
|
||||||
(def category-nav-height (+ (safe-area/get-bottom) showcase-nav.style/height))
|
(def category-nav-height (+ (safe-area/get-bottom) constants/categories-selector-height))
|
||||||
|
|
||||||
(def search-input-container
|
(def search-input-container
|
||||||
{:padding-horizontal 20
|
{:padding-horizontal 20
|
||||||
|
@ -35,7 +34,7 @@
|
||||||
(dissoc :margin-right)))
|
(dissoc :margin-right)))
|
||||||
|
|
||||||
(def list-container
|
(def list-container
|
||||||
{:padding-bottom showcase-nav.style/height})
|
{:padding-bottom constants/categories-selector-height})
|
||||||
|
|
||||||
(def empty-results
|
(def empty-results
|
||||||
{:margin-top 100})
|
{:margin-top 100})
|
||||||
|
|
Loading…
Reference in New Issue