mirror of
https://github.com/penpot/penpot.git
synced 2025-02-08 08:08:30 -05:00
Show only on create
This commit is contained in:
parent
36f92aa241
commit
70b570f112
1 changed files with 4 additions and 2 deletions
|
@ -98,7 +98,8 @@
|
|||
|
||||
(mf/defc edit-theme
|
||||
[{:keys [token-sets theme on-back] :as props}]
|
||||
(let [theme-state (mf/use-state {:token-sets token-sets
|
||||
(let [edit? (some? (:id theme))
|
||||
theme-state (mf/use-state {:token-sets token-sets
|
||||
:theme theme})
|
||||
token-set-active? (mf/use-callback
|
||||
(mf/deps theme-state)
|
||||
|
@ -134,7 +135,8 @@
|
|||
:on-select on-toggle-token-set
|
||||
:on-toggle on-toggle-token-set}]]
|
||||
[:div {:class (stl/css :edit-theme-footer)}
|
||||
[:button {:class (stl/css :button-secondary)} "Delete"]
|
||||
(when edit?
|
||||
[:button {:class (stl/css :button-secondary)} "Delete"])
|
||||
[:div {:class (stl/css :button-footer)}
|
||||
[:button {:class (stl/css :button-secondary)} "Cancel"]
|
||||
[:button {:class (stl/css :button-primary)} "Save theme"]]]]))
|
||||
|
|
Loading…
Add table
Reference in a new issue