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

Merge pull request #98 from tokens-studio/icons-spacing

Add more space between icon and label, fix icon offset
This commit is contained in:
Florian Schrödl 2024-05-14 16:27:19 +02:00 committed by GitHub
commit b9e9f9fb13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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;
}