0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-23 23:35:58 -05:00

Merge pull request #4322 from penpot/eva-fix-layer-color

🐛 Fix component layer color
This commit is contained in:
Alejandro 2024-03-26 07:26:31 +01:00 committed by GitHub
commit e4c8d09e9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -9,6 +9,7 @@
(:require
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.types.component :as ctk]
[app.main.data.viewer :as dv]
[app.main.store :as st]
[app.main.ui.workspace.sidebar.layer-item :refer [layer-item-inner]]
@ -30,7 +31,7 @@
item-ref (mf/use-ref nil)
depth (+ depth 1)
component-tree? (or component-child? (:component-root item))
component-tree? (or component-child? (ctk/instance-root? item) (ctk/instance-head? item))
collapsed-iref
(mf/use-memo

View file

@ -10,6 +10,7 @@
[app.common.data :as d]
[app.common.data.macros :as dm]
[app.common.files.helpers :as cfh]
[app.common.types.component :as ctk]
[app.common.types.container :as ctn]
[app.common.types.shape.layout :as ctl]
[app.common.uuid :as uuid]
@ -61,7 +62,7 @@
:class (stl/css-case
:layer-row true
:highlight highlighted?
:component (some? (:component-id item))
:component (ctk/instance-head? item)
:masked (:masked-group item)
:selected selected?
:type-frame (cfh/frame-shape? item)
@ -321,7 +322,7 @@
ref (mf/use-ref)
depth (+ depth 1)
component-tree? (or component-child? (:component-root item))
component-tree? (or component-child? (ctk/instance-root? item) (ctk/instance-head? item))
enable-drag (mf/use-fn #(reset! drag-disabled* false))
disable-drag (mf/use-fn #(reset! drag-disabled* true))]