commands button
This commit is contained in:
parent
952d3736c8
commit
e728c155a1
Binary file not shown.
After Width: | Height: | Size: 469 B |
Binary file not shown.
After Width: | Height: | Size: 247 B |
Binary file not shown.
After Width: | Height: | Size: 333 B |
Binary file not shown.
After Width: | Height: | Size: 651 B |
Binary file not shown.
After Width: | Height: | Size: 823 B |
|
@ -9,11 +9,24 @@
|
|||
:justifyContent :center})
|
||||
|
||||
(defn message-input-button [scale]
|
||||
{:transform [{:scale scale}]})
|
||||
{:transform [{:scale scale}]
|
||||
:width 24
|
||||
:height 24
|
||||
:alignItems :center
|
||||
:justifyContent :center})
|
||||
|
||||
(def list-icon
|
||||
{:width 13
|
||||
:height 12})
|
||||
{:width 16
|
||||
:height 16})
|
||||
|
||||
(def requests-icon
|
||||
{:background-color :#7099e6
|
||||
:width 8
|
||||
:height 8
|
||||
:border-radius 8
|
||||
:left 0
|
||||
:top 0
|
||||
:position :absolute})
|
||||
|
||||
(def close-icon
|
||||
{:width 12
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
[status-im.components.react :refer [view
|
||||
animated-view
|
||||
icon
|
||||
text
|
||||
touchable-highlight]]
|
||||
[status-im.components.animation :as anim]
|
||||
[status-im.chat.styles.plain-message :as st]
|
||||
|
@ -38,6 +39,8 @@
|
|||
|
||||
(defn commands-button []
|
||||
(let [command? (subscribe [:command?])
|
||||
requests (subscribe [:get-requests])
|
||||
suggestions (subscribe [:get-suggestions])
|
||||
buttons-scale (anim/create-value (if @command? 1 0))
|
||||
container-width (anim/create-value (if @command? 20 56))
|
||||
context {:command? command?
|
||||
|
@ -58,7 +61,12 @@
|
|||
[animated-view {:style (st/message-input-button-touchable
|
||||
container-width)}
|
||||
[animated-view {:style (st/message-input-button buttons-scale)}
|
||||
[icon :list st/list-icon]]]])})))
|
||||
(if (seq @suggestions)
|
||||
[icon :close_gray st/close-icon]
|
||||
[icon :input_list st/list-icon])
|
||||
(when (and (seq @requests)
|
||||
(not (seq @suggestions)))
|
||||
[view st/requests-icon])]]])})))
|
||||
|
||||
(defn smile-animation-logic [{:keys [command? val width]}]
|
||||
(fn [_]
|
||||
|
|
Loading…
Reference in New Issue