sidebar-content.svelte 536 B

123456789101112131415161718192021222324
  1. <script lang="ts">
  2. import type { HTMLAttributes } from "svelte/elements";
  3. import { cn, type WithElementRef } from "$lib/utils.js";
  4. let {
  5. ref = $bindable(null),
  6. class: className,
  7. children,
  8. ...restProps
  9. }: WithElementRef<HTMLAttributes<HTMLElement>> = $props();
  10. </script>
  11. <div
  12. bind:this={ref}
  13. data-slot="sidebar-content"
  14. data-sidebar="content"
  15. class={cn(
  16. "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
  17. className
  18. )}
  19. {...restProps}
  20. >
  21. {@render children?.()}
  22. </div>