Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ykrods committed Sep 2, 2024
1 parent 016bf01 commit 3dce374
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/Router.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import NotFound from "$src/pages/NotFound.svelte";
const routes = {
"#Home": () => import("$src/pages/Home.svelte"),
"#Home": () => import("./pages/Home.svelte"),
"#Form-basic": () => import("./pages/FormBasic.svelte"),
"#Form-reactive": () => import("./pages/FormReactive.svelte"),
"#Dropdown": () => import("./pages/Dropdown.svelte"),
"#Dialog": () => import("./pages/Dialog.svelte"),
"#ProgressRing": () => import("$src/pages/ProgressRing.svelte"),
"#ProgressRing": () => import("./pages/ProgressRing.svelte"),
};
let RouteComponent: Component = $state();
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Dialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<div>
<Confirmation
bind:open
title="Confirmation"
label="Confirmation"
onConfirm={() => { result = "confirmed"; }}
onCancel={() => { result = "canceled"; }}
>
Expand Down
10 changes: 6 additions & 4 deletions src/ui/Confirmation.svelte
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
<script lang="ts">
import type { Snippet } from "svelte";
import "@shoelace-style/shoelace/dist/components/dialog/dialog";
import SlDialog from "@shoelace-style/shoelace/dist/components/dialog/dialog";
import { SLButton } from "$src/shoelace";
type Props = Partial<SlDialog>;
let {
open = $bindable(false),
title = "",
onConfirm = null,
onCancel = null,
children,
...props
}: {
open: boolean
title: string
onConfirm?: () => any
onCancel?: () => any
children: Snippet
} = $props();
} & Props = $props();
let dialog;
let confirmed = $state(false);
Expand Down Expand Up @@ -50,7 +52,7 @@
}
});
</script>
<sl-dialog bind:this={dialog} label={title}>
<sl-dialog bind:this={dialog} {...props}>
{@render children()}
<div slot="footer">
<SLButton
Expand Down

0 comments on commit 3dce374

Please sign in to comment.