We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bae434a commit 61af41cCopy full SHA for 61af41c
src/lib/components/primitives/separator/index.ts
@@ -0,0 +1,7 @@
1
+import Root from "./separator.svelte";
2
+
3
+export {
4
+ Root,
5
+ //
6
+ Root as Separator,
7
+};
src/lib/components/primitives/separator/separator.svelte
@@ -0,0 +1,22 @@
+<script lang="ts">
+ import { Separator as SeparatorPrimitive } from "bits-ui";
+ import { cn } from "$lib/utils/shadcn-helper.js";
+ let {
+ ref = $bindable(null),
+ class: className,
8
+ orientation = "horizontal",
9
+ ...restProps
10
+ }: SeparatorPrimitive.RootProps = $props();
11
+</script>
12
13
+<SeparatorPrimitive.Root
14
+ bind:ref
15
+ class={cn(
16
+ "bg-border shrink-0",
17
+ orientation === "horizontal" ? "h-[1px] w-full" : "min-h-full w-[1px]",
18
+ className,
19
+ )}
20
+ {orientation}
21
+ {...restProps}
22
+/>
0 commit comments