frontend: containers refactor

This commit is contained in:
OleSTEEP 2025-10-13 21:40:31 +03:00
parent 5be65229f4
commit 09c0f12692
11 changed files with 126 additions and 72 deletions

View file

@ -0,0 +1,39 @@
<script lang="ts">
import Mark from "../mark.svelte";
import AddButton from "../add_button.svelte";
let { value = $bindable([]), label = "" } = $props();
let items: string[] = $state([]);
</script>
<div class="marks-container input rounded">
<p>{label}</p>
{#each items as item}
<Mark text={item}/>
{/each}
<AddButton handler={() => {
items.push("");
value = items;
}} />
</div>
<style>
/* Горизонтальный список */
.marks-container {
display: flex;
overflow-x: scroll;
align-content: center;
padding: 0.5rem;
}
.marks-container :global(*) {
margin: 0;
margin-right: 0.5rem;
}
.marks-container p {
align-content: center;
}
</style>