Adds float visibility
This commit is contained in:
@@ -680,20 +680,19 @@
|
||||
:name (fc/field-name)
|
||||
:class "w-24"}))))
|
||||
(com/data-grid-cell {:class "align-top"}
|
||||
[:div.p-2 {:x-data (hx/json {:popper nil
|
||||
:hover false})
|
||||
:x-init "popper = Popper.createPopper($refs.button, $refs.tooltip, {placement: 'bottom', strategy: 'fixed', modifiers: [{name: 'preventOverflow'}, {name: 'offset', options: {offset: [0, 10]}}]});"}
|
||||
[:div.p-2
|
||||
(cond (seq (fc/field-errors))
|
||||
[:div.w-8.h-8.bg-red-50.rounded-full.p-2.text-red-300.flex.items-start
|
||||
{"@mouseover" "hover=true; $nextTick(() => popper.update()); console.log('hi')"
|
||||
"@mouseout" "hover=false"
|
||||
:x-ref "button"}
|
||||
svg/alert]
|
||||
[:div
|
||||
{ :x-popper (hx/json {:source "$refs.button"
|
||||
:tooltip "$refs.tooltip"})}
|
||||
[:div.w-8.h-8.bg-red-50.rounded-full.p-2.text-red-300.flex.items-start
|
||||
{ :x-ref "button"}
|
||||
svg/alert]
|
||||
(com/tooltip {:x-ref "tooltip"}
|
||||
[:span (pr-str (fc/field-errors))])]
|
||||
:else
|
||||
nil)
|
||||
[:div (hx/alpine-appear {:x-ref "tooltip" :x-show "hover"
|
||||
:class "bg-gray-100 dark:bg-gray-600 rounded-lg shadow-2xl w-max z-50 p-4"})
|
||||
[:span (pr-str (fc/field-errors))]]]))))}
|
||||
]))))}
|
||||
|
||||
[:div.flex.m-4.flex-row-reverse
|
||||
(com/button {:color :primary} "Import")])])))])
|
||||
|
||||
Reference in New Issue
Block a user