0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

Add more space between icon and label, fix icon offset

This commit is contained in:
Florian Schroedl 2024-05-14 16:01:11 +02:00
parent d67311b126
commit 4d14d78eed
2 changed files with 10 additions and 2 deletions

View file

@ -52,7 +52,7 @@
(mf/defc token-component
[{:keys [type file tokens selected-shapes token-type-props]}]
(let [open? (mf/use-state false)
{:keys [icon modal attributes title]} token-type-props
{:keys [modal attributes title]} token-type-props
on-toggle-open-click (mf/use-fn
(mf/deps open? tokens)
#(when (seq tokens)
@ -78,7 +78,9 @@
[:div {:on-click on-toggle-open-click}
[:& cmm/asset-section {:file-id (:id file)
:icon (mf/fnc icon-wrapper [_]
[:& token-section-icon {:type type}])
[:div {:class (stl/css :section-icon)}
[:& token-section-icon {:type type}]])
:title title
:assets-count tokens-count
:open? @open?}

View file

@ -42,3 +42,9 @@
display: flex;
place-content: center;
}
.section-icon {
margin-right: $s-4;
// Align better with the label
translate: 0px -1px;
}