DuyTa's picture
Upload folder using huggingface_hub
bc20498 verified
raw
history blame
657 Bytes
<script>import { setScrollbarOrientation } from "../ctx.js";
import { writable } from "svelte/store";
import ScrollAreaScrollbarY from "./scroll-area-scrollbar-y.svelte";
import ScrollAreaScrollbarX from "./scroll-area-scrollbar-x.svelte";
export let orientation;
const orientationStore = writable(orientation);
setScrollbarOrientation(orientationStore);
$:
orientationStore.set(orientation);
</script>
{#if $orientationStore === "vertical"}
<ScrollAreaScrollbarY {...$$restProps} let:builder>
<slot {builder} />
</ScrollAreaScrollbarY>
{:else}
<ScrollAreaScrollbarX {...$$restProps} let:builder>
<slot {builder} />
</ScrollAreaScrollbarX>
{/if}