discoveries toolbar
This commit is contained in:
parent
739ca7cb1b
commit
5f0862e3b7
|
@ -16,16 +16,17 @@
|
||||||
(or hashtags [])))
|
(or hashtags [])))
|
||||||
|
|
||||||
(defn title-content [show-search]
|
(defn title-content [show-search]
|
||||||
(if show-search
|
[view st/discovery-toolbar-content
|
||||||
[text-input {:style st/discovery-search-input
|
(if show-search
|
||||||
:autoFocus true
|
[text-input {:style st/discovery-search-input
|
||||||
:placeholder "Type your search tags here"
|
:autoFocus true
|
||||||
:onSubmitEditing (fn [e]
|
:placeholder "Type your search tags here"
|
||||||
(let [search (aget e "nativeEvent" "text")
|
:onSubmitEditing (fn [e]
|
||||||
hashtags (get-hashtags search)]
|
(let [search (aget e "nativeEvent" "text")
|
||||||
(dispatch [:broadcast-status search hashtags])))}]
|
hashtags (get-hashtags search)]
|
||||||
[view
|
(dispatch [:broadcast-status search hashtags])))}]
|
||||||
[text {:style st/discovery-title} "Discover"]]))
|
[view
|
||||||
|
[text {:style st/discovery-title} "Discover"]])])
|
||||||
|
|
||||||
(defn toogle-search [current-value]
|
(defn toogle-search [current-value]
|
||||||
(dispatch [:set ::show-search (not current-value)]))
|
(dispatch [:set ::show-search (not current-value)]))
|
||||||
|
@ -34,15 +35,14 @@
|
||||||
[show-search [:get ::show-search]]
|
[show-search [:get ::show-search]]
|
||||||
[view st/discovery-container
|
[view st/discovery-container
|
||||||
[toolbar
|
[toolbar
|
||||||
{:style st/discovery-toolbar
|
{:style st/discovery-toolbar
|
||||||
:nav-action {:image {:source {:uri :icon_hamburger}
|
:nav-action {:image {:source {:uri :icon_hamburger}
|
||||||
:style st/hamburger-icon}
|
:style st/hamburger-icon}
|
||||||
:handler #(dispatch [:create-fake-discovery!])}
|
:handler #(dispatch [:create-fake-discovery!])}
|
||||||
:title "Add Participants"
|
:custom-content [title-content show-search]
|
||||||
:content [title-content show-search]
|
:action {:image {:source {:uri :icon_search}
|
||||||
:action {:image {:source {:uri :icon_search}
|
:style st/search-icon}
|
||||||
:style st/search-icon}
|
:handler #(toogle-search show-search)}}]
|
||||||
:handler #(toogle-search show-search)}}]
|
|
||||||
[scroll-view {:style {}}
|
[scroll-view {:style {}}
|
||||||
[view st/section-spacing
|
[view st/section-spacing
|
||||||
[text {:style st/discovery-subtitle} "Popular tags"]]
|
[text {:style st/discovery-subtitle} "Popular tags"]]
|
||||||
|
|
Loading…
Reference in New Issue