dialog quick
This commit is contained in:
2
dist/sigpro.ui.css
vendored
2
dist/sigpro.ui.css
vendored
File diff suppressed because one or more lines are too long
2
dist/sigpro.ui.js
vendored
2
dist/sigpro.ui.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -116,9 +116,10 @@ export const ui = {
|
|||||||
watch(show, s => s ? setTimeout(() => anim(true), 10) : anim(false));
|
watch(show, s => s ? setTimeout(() => anim(true), 10) : anim(false));
|
||||||
|
|
||||||
return h("div", {
|
return h("div", {
|
||||||
class: () => `fixed z-50 transition-all duration-300 ${show() ? (anim() ? 'opacity-100 scale-100' : 'opacity-0 scale-95') : 'opacity-0 scale-95 pointer-events-none'
|
class: () => `fixed z-50 transition-opacity duration-300 ${
|
||||||
|
show() ? (anim() ? 'opacity-100 scale-100' : 'opacity-0 scale-95') : 'opacity-0 scale-95 pointer-events-none'
|
||||||
}`,
|
}`,
|
||||||
style: () => `left: ${pos().x}px; top: ${pos().y}px;`
|
style: () => `left: ${pos().x}px; top: ${pos().y}px; transition: left 50ms, top 50ms;`
|
||||||
}, [
|
}, [
|
||||||
h("div", {
|
h("div", {
|
||||||
class: `bg-base-100 rounded-box shadow-2xl border border-base-300 ${p.class || ''}`,
|
class: `bg-base-100 rounded-box shadow-2xl border border-base-300 ${p.class || ''}`,
|
||||||
@@ -141,7 +142,7 @@ export const ui = {
|
|||||||
p.footer ? h("div", { class: "p-2 border-t flex justify-end gap-2" }, p.footer) : null
|
p.footer ? h("div", { class: "p-2 border-t flex justify-end gap-2" }, p.footer) : null
|
||||||
])
|
])
|
||||||
]);
|
]);
|
||||||
},
|
},
|
||||||
divider: (p) => h("div", { ...p, class: `divider ${p.class || ''}` }),
|
divider: (p) => h("div", { ...p, class: `divider ${p.class || ''}` }),
|
||||||
drawer: (p, c) => h("div", { ...p, class: `drawer ${p.class || ''}` }, c),
|
drawer: (p, c) => h("div", { ...p, class: `drawer ${p.class || ''}` }, c),
|
||||||
drawer_toggle: (p) => h("input", { ...p, type: "checkbox", class: `drawer-toggle ${p.class || ''}` }),
|
drawer_toggle: (p) => h("input", { ...p, type: "checkbox", class: `drawer-toggle ${p.class || ''}` }),
|
||||||
|
|||||||
Reference in New Issue
Block a user