mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-07-23 21:12:59 +00:00
refactor: consume Commonlib as a package
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<script lang="ts">
|
||||
import { translateIfAvailable as translate } from "@vrtmrz/livesync-commonlib/compat/common/i18n";
|
||||
|
||||
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>
|
||||
Reference in New Issue
Block a user