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?]}]
|
[{:keys [big? disabled?]}]
|
||||||
(cond-> {}
|
(cond-> {}
|
||||||
disabled? (assoc :opacity 0.3)
|
disabled? (assoc :opacity 0.3)
|
||||||
big? (assoc :flex-grow 1)
|
big? (assoc :flex 1)
|
||||||
(not big?) (assoc :width 104)))
|
(not big?) (assoc :width 104)))
|
||||||
|
|
||||||
(defn channel-action
|
(defn channel-action
|
||||||
|
|
|
@ -14,7 +14,8 @@
|
||||||
on-press-in (rn/use-callback #(set-pressed true))
|
on-press-in (rn/use-callback #(set-pressed true))
|
||||||
on-press-out (rn/use-callback #(set-pressed false))]
|
on-press-out (rn/use-callback #(set-pressed false))]
|
||||||
[rn/view
|
[rn/view
|
||||||
{:style (style/channel-action-container
|
{:accessibility-label :channel-action
|
||||||
|
:style (style/channel-action-container
|
||||||
{:big? big?
|
{:big? big?
|
||||||
:disabled? disabled?})}
|
:disabled? disabled?})}
|
||||||
[rn/pressable
|
[rn/pressable
|
||||||
|
|
|
@ -34,6 +34,17 @@
|
||||||
:customization-color :blue
|
:customization-color :blue
|
||||||
:icon :i/muted}]}]
|
:icon :i/muted}]}]
|
||||||
[rn/view {:height 50}]
|
[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
|
[quo/channel-actions
|
||||||
{:actions [{:label "Pinned Messages"
|
{:actions [{:label "Pinned Messages"
|
||||||
:customization-color :blue
|
:customization-color :blue
|
||||||
|
|
Loading…
Reference in New Issue