feat: divide page into components

This commit is contained in:
2026-02-04 09:53:35 +05:00
parent 50f3930bf1
commit f9f1693e44
7 changed files with 265 additions and 181 deletions
+40
View File
@@ -0,0 +1,40 @@
<script lang="ts">
import TextManager from "./TextManager.svelte";
let {
texts,
onTextAdd,
onTextUpdate,
onTextDelete
}: {
texts: Array<{ id: string; text: string }>;
onTextAdd: (text: string) => void;
onTextUpdate: (id: string, text: string) => void;
onTextDelete: (id: string) => void;
} = $props();
</script>
<div class="text-section">
<h2>Добавьте тексты для панелей</h2>
<TextManager
onTextAdd={onTextAdd}
onTextUpdate={onTextUpdate}
onTextDelete={onTextDelete}
texts={texts}
/>
</div>
<style>
.text-section {
display: flex;
flex-direction: column;
gap: 1rem;
}
.text-section h2 {
margin: 0;
color: #333;
font-size: 1.5rem;
font-weight: 600;
}
</style>