mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
✨ UI debug toggle for export/import
This commit is contained in:
parent
76e2309778
commit
5c9ec92cc5
12 changed files with 81 additions and 60 deletions
|
@ -39,17 +39,15 @@
|
|||
(log/debug :action "import-end")
|
||||
(when on-finish-import (on-finish-import))))))))))
|
||||
|
||||
(mf/defc import-button
|
||||
[{:keys [project-id on-finish-import]}]
|
||||
(mf/defc import-form
|
||||
{::mf/forward-ref true}
|
||||
[{:keys [project-id on-finish-import]} external-ref]
|
||||
|
||||
(let [file-input (mf/use-ref nil)
|
||||
on-file-selected (use-import-file project-id on-finish-import)]
|
||||
(let [on-file-selected (use-import-file project-id on-finish-import)]
|
||||
[:form.import-file
|
||||
[:button.import-file-btn {:type "button"
|
||||
:on-click #(dom/click (mf/ref-val file-input))} i/import]
|
||||
[:& file-uploader {:accept "application/zip"
|
||||
:multi true
|
||||
:input-ref file-input
|
||||
:ref external-ref
|
||||
:on-selected on-file-selected}]]))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue