Skip to content

Commit

Permalink
Updated shadcn and bits
Browse files Browse the repository at this point in the history
  • Loading branch information
niemyjski committed Jan 8, 2025
1 parent 49a431c commit 4640550
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 28 deletions.
46 changes: 31 additions & 15 deletions src/Exceptionless.Web/ClientApp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Exceptionless.Web/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@tanstack/svelte-query-devtools": "https://pkg.pr.new/@tanstack/svelte-query-devtools@28f98f9",
"@tanstack/svelte-table": "^9.0.0-alpha.10",
"@typeschema/class-validator": "^0.3.0",
"bits-ui": "^1.0.0-next.74",
"bits-ui": "^1.0.0-next.77",
"class-validator": "^0.14.1",
"clsx": "^2.1.1",
"formsnap": "^2.0.0",
Expand All @@ -78,4 +78,4 @@
"unplugin-icons": "^0.22.0"
},
"type": "module"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,20 @@
ref = $bindable(null),
open = $bindable(true),
onOpenChange = () => {},
controlledOpen = false,
class: className,
style,
children,
...restProps
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
open?: boolean;
onOpenChange?: (open: boolean) => void;
controlledOpen?: boolean;
} = $props();
const sidebar = setSidebar({
open: () => open,
setOpen: (value: boolean) => {
if (controlledOpen) {
onOpenChange(value);
} else {
open = value;
onOpenChange(value);
}
open = value;
onOpenChange(value);
// This sets the cookie to keep the sidebar state.
document.cookie = `${SIDEBAR_COOKIE_NAME}=${open}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
</div>
{:else if sidebar.isMobile}
<Sheet.Root
controlledOpen
open={sidebar.openMobile}
onOpenChange={sidebar.setOpenMobile}
bind:open={() => sidebar.openMobile, (v) => sidebar.setOpenMobile(v)}
{...restProps}
>
<Sheet.Content
Expand Down

0 comments on commit 4640550

Please sign in to comment.