Skip to content

Commit

Permalink
enhance: smaller block icon when collapsed
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed Nov 4, 2024
1 parent 9cbc598 commit 5377668
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/frontend/components/block.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -2092,7 +2092,8 @@
" hide-inner-bullet")
(when order-list? " as-order-list typed-list"))}

(let [icon (icon-component/get-node-icon-cp block {:size 16 :color? true})]
(let [icon-size (if collapsed? 12 14)
icon (icon-component/get-node-icon-cp block {:size icon-size :color? true})]
(cond
(and (some? icon)
(or (db/page? block)
Expand Down
2 changes: 1 addition & 1 deletion src/main/frontend/components/icon.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

(defn get-node-icon-cp
[node-entity opts]
(let [opts' (assoc opts :size 14)
(let [opts' (merge {:size 14} opts)
node-icon (get-node-icon node-entity)]
(when-not (or (string/blank? node-icon) (and (contains? #{"letter-n" "page"} node-icon) (:not-text-or-page? opts)))
[:span.icon-cp-container
Expand Down

0 comments on commit 5377668

Please sign in to comment.