mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 06:02:32 -05:00
add folder-open icon and use for open groups
This commit is contained in:
parent
bcf61f34fe
commit
fa230a4224
3 changed files with 12 additions and 1 deletions
7
frontend/resources/images/icons/folder-open.svg
Normal file
7
frontend/resources/images/icons/folder-open.svg
Normal file
|
@ -0,0 +1,7 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" stroke-linecap="round" stroke-linejoin="round">
|
||||
<g data-testid="Icons / Tools + Layers / S / Open folder S">
|
||||
<g class="frame-children" data-testid="svg-path">
|
||||
<path d="m3.5 12.339 1.652-5.363a.75.75 0 0 1 .717-.53h7.074a.75.75 0 0 1 .708.998l-1.538 4.393a.75.75 0 0 1-.708.502H3.5Za.75.75 0 0 1-.75-.75V4.622c0-.297.112-.582.314-.793.201-.211.473-.329.757-.329h2.143l.804 1.263h4.071a.75.75 0 0 1 .75.75v.933" fill="none" stroke-width="1" stroke="#8f9da3" stroke-opacity="1"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 572 B |
|
@ -121,6 +121,7 @@
|
|||
(def ^:icon flex (icon-xref :flex))
|
||||
(def ^:icon flip-horizontal (icon-xref :flip-horizontal))
|
||||
(def ^:icon flip-vertical (icon-xref :flip-vertical))
|
||||
(def ^:icon folder-open (icon-xref :folder-open))
|
||||
(def ^:icon gap-horizontal (icon-xref :gap-horizontal))
|
||||
(def ^:icon gap-vertical (icon-xref :gap-vertical))
|
||||
(def ^:icon graphics (icon-xref :graphics))
|
||||
|
|
|
@ -53,9 +53,12 @@
|
|||
(let [set (get sets set-id)]
|
||||
(when set
|
||||
(let [{:keys [type name children]} set
|
||||
icon i/document
|
||||
visible? (mf/use-state (contains? active-sets set-id))
|
||||
collapsed? (mf/use-state false)
|
||||
icon (cond
|
||||
(= type :set) i/document
|
||||
(and (= type :group) @collapsed?) i/group
|
||||
:else i/folder-open)
|
||||
selected? (mf/use-state (= set-id current-set-id))
|
||||
|
||||
on-click
|
||||
|
|
Loading…
Add table
Reference in a new issue