mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-07-23 13:02:58 +00:00
18 lines
452 B
Svelte
18 lines
452 B
Svelte
<script lang="ts">
|
|
import { translateIfAvailable as translate } from "@/common/translation";
|
|
|
|
type Props = {
|
|
title?: string;
|
|
children?: () => any;
|
|
};
|
|
const { children, title }: Props = $props();
|
|
const translatedTitle = $derived.by(() => (title ? translate(title) : ""));
|
|
</script>
|
|
|
|
<details>
|
|
<summary>{translatedTitle}</summary>
|
|
<div class="sub-section">
|
|
{@render children?.()}
|
|
</div>
|
|
</details>
|