This repository has been archived on 2025-08-19. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
coinstorge/website/src/lib/components/ui/tabs/tabs-content.svelte

29 lines
559 B
Svelte
Raw Normal View History

<script lang="ts">
import { Tabs as TabsPrimitive } from "bits-ui";
import { cn } from "$lib/utils.js";
2025-06-28 23:17:53 +03:00
import { browser } from "$app/environment";
let {
ref = $bindable(null),
class: className,
2025-06-28 23:17:53 +03:00
children,
...restProps
}: TabsPrimitive.ContentProps = $props();
</script>
2025-06-28 23:17:53 +03:00
{#if browser}
<TabsPrimitive.Content
bind:ref
data-slot="tabs-content"
class={cn("flex-1 outline-none", className)}
{...restProps}
/>
{:else}
<div
data-slot="tabs-content"
class={cn("flex-1 outline-none", className)}
>
{@render children?.()}
</div>
{/if}