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:
Lungu Cristian 2024-04-09 10:43:33 +03:00 committed by GitHub
parent edd1d0661d
commit 4e1851d53c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 4 deletions

View File

@ -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

View File

@ -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?

View File

@ -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