fix: minor style change

This commit is contained in:
Peng Xiao
2022-09-17 18:42:16 +08:00
parent ec3ab1cc79
commit 874b8d5be4
2 changed files with 6 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ h1.title.whiteboard-dashboard-title {
height: 300px;
.dashboard-card-checkbox {
@apply flex items-center justify-center rounded;
@apply flex items-center justify-center rounded flex-shrink-0;
border: 2px solid var(--ls-border-color);
visibility: hidden;
width: 24px;

View File

@@ -1010,15 +1010,15 @@
(rum/defc portal
([children]
(portal children #(js/document.createElement "div")))
([children append-to]
(portal children #(js/document.createElement "div") false))
([children attach-to prepend?]
(let [[portal-anchor set-portal-anchor] (rum/use-state nil)]
(rum/use-effect!
(fn []
(let [div (or (if (fn? append-to) (append-to) append-to)
(js/document.createElement "div"))]
(let [div (js/document.createElement "div")
attached (or (if (fn? attach-to) (attach-to) attach-to) js/document.body)]
(.setAttribute div "data-logseq-portal" (str (d/squuid)))
(.append js/document.body div)
(if prepend? (.prepend attached div) (.append attached div))
(set-portal-anchor div)
#(.remove div)))
[])