0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-15 19:48:22 -05:00

Merge pull request #5023 from penpot/eva-add-tooltips-to-typography

🐛 Add missing tooltips to typography options
This commit is contained in:
Andrey Antukh 2024-08-27 17:54:41 +02:00 committed by GitHub
commit 19d6f4381a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -293,6 +293,7 @@
:show-recent show-recent}]) :show-recent show-recent}])
[:div {:class (stl/css :font-option) [:div {:class (stl/css :font-option)
:title (tr "inspect.attributes.typography.font-family")
:on-click #(reset! open-selector? true)} :on-click #(reset! open-selector? true)}
(cond (cond
(= :multiple font-id) (= :multiple font-id)
@ -309,7 +310,8 @@
(tr "dashboard.fonts.deleted-placeholder"))] (tr "dashboard.fonts.deleted-placeholder"))]
[:div {:class (stl/css :font-modifiers)} [:div {:class (stl/css :font-modifiers)}
[:div {:class (stl/css :font-size-options)} [:div {:class (stl/css :font-size-options)
:title (tr "inspect.attributes.typography.font-size")}
(let [size-options [8 9 10 11 12 14 16 18 24 36 48 72] (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)] size-options (if (= font-size :multiple) (into [""] size-options) size-options)]
[:& editable-select [:& editable-select
@ -324,7 +326,8 @@
:on-change on-font-size-change :on-change on-font-size-change
:on-blur on-blur}])] :on-blur on-blur}])]
[:div {:class (stl/css :font-variant-options)} [:div {:class (stl/css :font-variant-options)
:title (tr "inspect.attributes.typography.font-style")}
(let [basic-variant-options (->> (:variants font) (let [basic-variant-options (->> (:variants font)
(map (fn [variant] (map (fn [variant]
{:value (:id variant) {:value (:id variant)
@ -359,7 +362,8 @@
(on-change {attr (str value)}))] (on-change {attr (str value)}))]
[:div {:class (stl/css :spacing-options)} [:div {:class (stl/css :spacing-options)}
[:div {:class (stl/css :line-height)} [:div {:class (stl/css :line-height)
:title (tr "inspect.attributes.typography.line-height")}
[:span {:class (stl/css :icon) [:span {:class (stl/css :icon)
:alt (tr "workspace.options.text-options.line-height")} :alt (tr "workspace.options.text-options.line-height")}
i/text-lineheight] i/text-lineheight]
@ -375,7 +379,8 @@
:on-change #(handle-change % :line-height) :on-change #(handle-change % :line-height)
:on-blur on-blur}]] :on-blur on-blur}]]
[:div {:class (stl/css :letter-spacing)} [:div {:class (stl/css :letter-spacing)
:title (tr "inspect.attributes.typography.letter-spacing")}
[:span [:span
{:class (stl/css :icon) {:class (stl/css :icon)
:alt (tr "workspace.options.text-options.letter-spacing")} :alt (tr "workspace.options.text-options.letter-spacing")}
@ -407,14 +412,17 @@
:name "text-transform"} :name "text-transform"}
[:& radio-button {:icon i/text-uppercase [:& radio-button {:icon i/text-uppercase
:type "checkbox" :type "checkbox"
:title (tr "inspect.attributes.typography.text-transform.uppercase")
:value "uppercase" :value "uppercase"
:id "text-transform-uppercase"}] :id "text-transform-uppercase"}]
[:& radio-button {:icon i/text-mixed [:& radio-button {:icon i/text-mixed
:type "checkbox" :type "checkbox"
:value "capitalize" :value "capitalize"
:title (tr "inspect.attributes.typography.text-transform.titlecase")
:id "text-transform-capitalize"}] :id "text-transform-capitalize"}]
[:& radio-button {:icon i/text-lowercase [:& radio-button {:icon i/text-lowercase
:type "checkbox" :type "checkbox"
:title (tr "inspect.attributes.typography.text-transform.lowercase")
:value "lowercase" :value "lowercase"
:id "text-transform-lowercase"}]]])) :id "text-transform-lowercase"}]]]))