mirror of
https://github.com/penpot/penpot.git
synced 2025-07-25 15:47:18 +02:00
🐛 Fix font size input not displaying 'mixed' when needed
This commit is contained in:
parent
ad842872fb
commit
35b29bb203
7 changed files with 535 additions and 5 deletions
|
@ -20,7 +20,7 @@
|
|||
[rumext.v2 :as mf]))
|
||||
|
||||
(mf/defc editable-select
|
||||
[{:keys [value type options class on-change placeholder on-blur input-class] :as params}]
|
||||
[{:keys [value type options class on-change placeholder on-blur input-class aria-label] :as params}]
|
||||
(let [state* (mf/use-state {:id (uuid/next)
|
||||
:is-open? false
|
||||
:current-value value
|
||||
|
@ -168,14 +168,16 @@
|
|||
:on-change set-value
|
||||
:on-focus handle-focus
|
||||
:on-blur handle-blur
|
||||
:aria-label aria-label
|
||||
:placeholder placeholder}]
|
||||
[:input {:value (or (some-> current-value value->label) "")
|
||||
[:input {:value (if (= value :multiple) nil (or (some-> current-value value->label) ""))
|
||||
:class input-class
|
||||
:on-change handle-change-input
|
||||
:on-key-down handle-key-down
|
||||
:on-focus handle-focus
|
||||
:on-blur handle-blur
|
||||
:placeholder placeholder
|
||||
:aria-label aria-label
|
||||
:type type}])
|
||||
|
||||
[:span {:class (stl/css :dropdown-button)
|
||||
|
|
|
@ -322,12 +322,13 @@
|
|||
(let [size-options [8 9 10 11 12 14 16 18 24 36 48 72]
|
||||
size-options (if (= font-size :multiple) (into [""] size-options) size-options)]
|
||||
[:& editable-select
|
||||
{:value (attr->string font-size)
|
||||
{:value (if (= font-size :multiple) :multiple (attr->string font-size))
|
||||
:class (stl/css :font-size-select)
|
||||
:aria-label (tr "inspect.attributes.typography.font-size")
|
||||
:input-class (stl/css :numeric-input)
|
||||
:options size-options
|
||||
:type "number"
|
||||
:placeholder "--"
|
||||
:placeholder (tr "settings.multiple")
|
||||
:min 3
|
||||
:max 1000
|
||||
:on-change on-font-size-change
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue