Skip to content

Commit

Permalink
chore(deps): updates
Browse files Browse the repository at this point in the history
  • Loading branch information
morlay committed Nov 9, 2023
1 parent 0385d01 commit 3e5bc40
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
Binary file modified bun.lockb
Binary file not shown.
21 changes: 12 additions & 9 deletions nodepkg/ui/src/Overlays/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import {
type ObservableRef,
ext,
rx,
render
render,
type VNodeChildAtom
} from "@nodepkg/runtime";
import { watch, ref, type VNodeChild } from "vue";
import { FilledButton, TextButton } from "../Buttons";
Expand All @@ -38,34 +39,36 @@ export const useDialog = (
};

export const useDialogModal = (opt: {
$title: () => VNodeChild;
$content: () => VNodeChild;
$title: () => VNodeChildAtom;
$content: () => VNodeChildAtom;
}) => {
return useDialog(() => {
return (
<DialogContainer>
<DialogHeadline>
<>{opt.$title()}</>
{opt.$title()}
</DialogHeadline>
<DialogContent>
<>{opt.$content()}</>
{opt.$content()}
</DialogContent>
</DialogContainer>
);
});
};

export const useDialogPrompt = (opt: {
$title: () => VNodeChild;
$content: () => VNodeChild;
$title: () => VNodeChildAtom;
$content: () => VNodeChildAtom;

onConfirm?: () => void;
}) => {
const dialog$ = useDialog(() => {


return (
<DialogContainer>
<DialogHeadline>
<>{opt.$title()}</>
{opt.$title()}
</DialogHeadline>
<DialogContent
component={"form"}
Expand All @@ -89,7 +92,7 @@ export const useDialogPrompt = (opt: {
</>
}
>
<>{opt.$content()}</>
{opt.$content()}
</DialogContent>
</DialogContainer>
);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@innoai-tech/config": "^0.5.2",
"@innoai-tech/gents": "^0.6.5",
"@innoai-tech/monobundle": "^0.11.10",
"@innoai-tech/vue-vite-presets": "^0.6.0",
"@innoai-tech/vue-vite-presets": "^0.6.1",
"@nodepkg/devconfig": "workspace:*",
"@types/js-yaml": "^4.0.9",
"@vue/test-utils": "^2.4.1",
Expand Down

0 comments on commit 3e5bc40

Please sign in to comment.