mirror of
https://github.com/penpot/penpot.git
synced 2025-02-23 23:35:58 -05:00
Merge pull request #2180 from penpot/palba-carousel-misaligment
🐛 Fix Libraries & Templates carousel misalingments
This commit is contained in:
commit
dbd2b8527a
1 changed files with 2 additions and 1 deletions
|
@ -80,6 +80,7 @@
|
|||
|
||||
card-width 275
|
||||
num-cards (count templates)
|
||||
container-size (* (+ 2 num-cards) card-width)
|
||||
;; We need space for num-cards plus the libraries&templates link
|
||||
more-cards (> (+ @card-offset (* (+ 1 num-cards) card-width)) content-width)
|
||||
content-ref (mf/use-ref)
|
||||
|
@ -148,7 +149,7 @@
|
|||
[:span (tr "dashboard.libraries-and-templates")]
|
||||
[:span.icon (if collapsed i/arrow-up i/arrow-down)]]]
|
||||
[:div.content {:ref content-ref
|
||||
:style {:left @card-offset}}
|
||||
:style {:left @card-offset :width (str container-size "px")}}
|
||||
(for [num-item (range (count templates)) :let [item (nth templates num-item)]]
|
||||
[:div.card-container {:id (str/concat "card-container-" num-item)
|
||||
:key (:id item)
|
||||
|
|
Loading…
Add table
Reference in a new issue