Перенос рендера иконок на сторону сервера

This commit is contained in:
Иван Кузьменко 2026-02-14 04:33:59 +03:00
parent 16f4930974
commit ef353da29f
16 changed files with 527 additions and 159 deletions

View file

@ -1,12 +1,11 @@
<script lang="ts">
import type { Snippet } from 'svelte';
import IconBlock from './IconBlock.svelte';
import WarningIcon from '~icons/material-symbols/warning';
let { children }: { children: Snippet } = $props();
</script>
<IconBlock
bgStrong="bg-yellow-500"
bgBleak="bg-yellow-50"
icon="material-symbols:warning"
caption="Внимание"
>
<slot />
<IconBlock bgStrong="bg-yellow-500" bgBleak="bg-yellow-50" icon={WarningIcon} caption="Внимание">
{@render children()}
</IconBlock>