[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:
Mohamed Javid 2023-11-09 02:26:56 +08:00 committed by GitHub
parent e573fc914a
commit 595b1cfc40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 9 deletions

View File

@ -2,11 +2,6 @@
(:require
[quo.foundations.colors :as colors]))
(def height 56)
(def root-container
{:height height})
(defn container
[state theme]
{:padding-top 12

View File

@ -25,7 +25,7 @@
(defn- view-internal
[{:keys [theme container-style default-active state data on-press active-id]}]
[rn/view
{:style (merge style/root-container container-style)
{:style container-style
:accessibility-label :showcase-nav}
[rn/flat-list
{:data data

View File

@ -16,6 +16,8 @@
(def ^:const emoji-row-separator-height 16)
(def ^:const categories-selector-height 56)
(def ^:const emoji-item-margin-right
(/ (- (:width (rn/get-window))
(* emoji-row-padding-horizontal 2)

View File

@ -1,13 +1,12 @@
(ns status-im2.contexts.emoji-picker.style
(:require
[quo.components.profile.showcase-nav.style :as showcase-nav.style]
[quo.foundations.colors :as colors]
[react-native.safe-area :as safe-area]
[status-im2.contexts.emoji-picker.constants :as constants]))
(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
{:padding-horizontal 20
@ -35,7 +34,7 @@
(dissoc :margin-right)))
(def list-container
{:padding-bottom showcase-nav.style/height})
{:padding-bottom constants/categories-selector-height})
(def empty-results
{:margin-top 100})