0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 15:39:50 -05:00

Merge pull request #1744 from penpot/multiexport-checkbox-fixes

🐛 Fix export multiple styles
This commit is contained in:
Andrey Antukh 2022-03-25 14:48:41 +01:00 committed by GitHub
commit 00d851998b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -1464,7 +1464,8 @@
}
}
& .unchecked {
& .intermediate,
.unchecked {
svg {
background-color: $color-gray-10;
}

View file

@ -18,6 +18,7 @@
[app.main.ui.workspace.shapes :refer [shape-wrapper]]
[app.util.dom :as dom]
[app.util.i18n :as i18n :refer [tr c]]
[app.util.strings :as ust]
[cuerdas.core :as str]
[rumext.alpha :as mf]))
@ -76,7 +77,7 @@
(cond
all-checked? [:span.checked i/checkbox-checked]
all-unchecked? [:span.unchecked i/checkbox-unchecked]
:else [:span i/checkbox-intermediate])]
:else [:span.intermediate i/checkbox-intermediate])]
[:div.field.title (tr "dashboard.export-multiple.selected"
(c (count enabled-exports))
(c (count all-exports)))]]
@ -107,8 +108,8 @@
[:div.field.name (cond-> (:name shape) suffix (str suffix))]
(when (:scale export)
[:div.field.scale (dm/str (* width (:scale export)) "x"
(* height (:scale export)) "px ")])
[:div.field.scale (dm/str (ust/format-precision (* width (:scale export)) 2) "x"
(ust/format-precision (* height (:scale export)) 2) "px ")])
(when (:type export)
[:div.field.extension (-> export :type d/name str/upper)])]))]