Fix the channel-action when the text is too long (#19462)
* fix: don't increase action with text * addressed review comments
This commit is contained in:
parent
edd1d0661d
commit
4e1851d53c
|
@ -6,7 +6,7 @@
|
|||
[{:keys [big? disabled?]}]
|
||||
(cond-> {}
|
||||
disabled? (assoc :opacity 0.3)
|
||||
big? (assoc :flex-grow 1)
|
||||
big? (assoc :flex 1)
|
||||
(not big?) (assoc :width 104)))
|
||||
|
||||
(defn channel-action
|
||||
|
|
|
@ -14,9 +14,10 @@
|
|||
on-press-in (rn/use-callback #(set-pressed true))
|
||||
on-press-out (rn/use-callback #(set-pressed false))]
|
||||
[rn/view
|
||||
{:style (style/channel-action-container
|
||||
{:big? big?
|
||||
:disabled? disabled?})}
|
||||
{:accessibility-label :channel-action
|
||||
:style (style/channel-action-container
|
||||
{:big? big?
|
||||
:disabled? disabled?})}
|
||||
[rn/pressable
|
||||
(cond-> {:style (style/channel-action
|
||||
{:big? big?
|
||||
|
|
|
@ -34,6 +34,17 @@
|
|||
:customization-color :blue
|
||||
:icon :i/muted}]}]
|
||||
[rn/view {:height 50}]
|
||||
[quo/channel-actions
|
||||
{:actions
|
||||
[{:big? true
|
||||
:label "Pinned Messages sometimes can get very long and we have to take care of that"
|
||||
:customization-color :blue
|
||||
:icon :i/pin
|
||||
:counter-value 5}
|
||||
{:label "Mute chat"
|
||||
:customization-color :blue
|
||||
:icon :i/muted}]}]
|
||||
[rn/view {:height 50}]
|
||||
[quo/channel-actions
|
||||
{:actions [{:label "Pinned Messages"
|
||||
:customization-color :blue
|
||||
|
|
Loading…
Reference in New Issue