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/collapsible/collapsible-content.svelte

19 lines
457 B
Svelte
Raw Normal View History

2025-06-25 22:33:07 +03:00
<script lang="ts">
import { Collapsible as CollapsiblePrimitive } from "bits-ui";
2025-06-29 00:21:40 +03:00
import { browser } from "$app/environment";
2025-06-25 22:33:07 +03:00
2025-06-29 00:21:40 +03:00
let {
ref = $bindable(null),
children,
...restProps
}: CollapsiblePrimitive.ContentProps = $props();
2025-06-25 22:33:07 +03:00
</script>
2025-06-29 00:21:40 +03:00
{#if browser}
<CollapsiblePrimitive.Content bind:ref data-slot="collapsible-content" {...restProps} />
{:else}
<div data-slot="collapsible-content" {...restProps}>
{@render children?.()}
</div>
{/if}