mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 22:22:43 -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:
commit
b9e9f9fb13
2 changed files with 10 additions and 2 deletions
|
@ -52,7 +52,7 @@
|
||||||
(mf/defc token-component
|
(mf/defc token-component
|
||||||
[{:keys [type file tokens selected-shapes token-type-props]}]
|
[{:keys [type file tokens selected-shapes token-type-props]}]
|
||||||
(let [open? (mf/use-state false)
|
(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
|
on-toggle-open-click (mf/use-fn
|
||||||
(mf/deps open? tokens)
|
(mf/deps open? tokens)
|
||||||
#(when (seq tokens)
|
#(when (seq tokens)
|
||||||
|
@ -78,7 +78,9 @@
|
||||||
[:div {:on-click on-toggle-open-click}
|
[:div {:on-click on-toggle-open-click}
|
||||||
[:& cmm/asset-section {:file-id (:id file)
|
[:& cmm/asset-section {:file-id (:id file)
|
||||||
:icon (mf/fnc icon-wrapper [_]
|
:icon (mf/fnc icon-wrapper [_]
|
||||||
[:& token-section-icon {:type type}])
|
[:div {:class (stl/css :section-icon)}
|
||||||
|
[:& token-section-icon {:type type}]])
|
||||||
|
|
||||||
:title title
|
:title title
|
||||||
:assets-count tokens-count
|
:assets-count tokens-count
|
||||||
:open? @open?}
|
:open? @open?}
|
||||||
|
|
|
@ -42,3 +42,9 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
place-content: center;
|
place-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.section-icon {
|
||||||
|
margin-right: $s-4;
|
||||||
|
// Align better with the label
|
||||||
|
translate: 0px -1px;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue