feat: divide page into components
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user