mirror of https://github.com/logseq/logseq
enhance(ux): improve checkbox interaction for the block property value
parent
c801175831
commit
0bcea11a40
|
@ -743,14 +743,14 @@
|
|||
:checkbox
|
||||
(let [add-property! (fn []
|
||||
(<add-property! block (:db/ident property) (boolean (not value))))]
|
||||
[:label.flex.w-full.as-scalar-value-wrap.cursor-pointer
|
||||
(shui/checkbox {:class "jtrigger flex flex-row items-center"
|
||||
:disabled config/publishing?
|
||||
:checked value
|
||||
:auto-focus true
|
||||
:on-checked-change add-property!
|
||||
:on-key-down (fn [e]
|
||||
(when (= (util/ekey e) "Enter")
|
||||
(add-property!)))}))
|
||||
(add-property!)))})])
|
||||
;; :others
|
||||
[:div.flex.flex-1
|
||||
(if editing?
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
.property-value-inner:hover {
|
||||
.property-value-inner {
|
||||
&:hover, .as-scalar-value-wrap:hover {
|
||||
@apply bg-gray-02 rounded transition-[background-color] duration-300;
|
||||
}
|
||||
}
|
||||
|
||||
.ls-property-dialog {
|
||||
|
|
Loading…
Reference in New Issue