feat: add text settings components

This commit is contained in:
2026-02-05 23:46:28 +05:00
parent 60b577b6df
commit a063a2d752
8 changed files with 260 additions and 3 deletions
+21
View File
@@ -0,0 +1,21 @@
<script lang="ts">
import type { Snippet } from "svelte";
interface Props {
children: Snippet;
}
let { children }: Props = $props();
</script>
<div class="settings-grid">
{@render children()}
</div>
<style>
.settings-grid {
display: flex;
flex-direction: column;
gap: 12px;
}
</style>
+38
View File
@@ -0,0 +1,38 @@
<script lang="ts">
import type { Snippet } from "svelte";
interface Props {
label: string;
children: Snippet;
}
let { label, children }: Props = $props();
</script>
<label class="setting-row">
<div class="setting-label">{label}</div>
<div class="setting-control">
{@render children()}
</div>
</label>
<style>
.setting-row {
display: grid;
grid-template-columns: 100px 1fr;
align-items: center;
gap: 12px;
}
.setting-label {
color: var(--text-secondary);
font-size: 13px;
font-weight: 500;
}
.setting-control {
display: flex;
align-items: center;
gap: 10px;
}
</style>
+2 -3
View File
@@ -1,12 +1,11 @@
<script lang="ts">
import TextConfig from "$components/text/TextConfig.svelte";
import TextManager from "$components/text/TextManager.svelte";
import Card from "./Card.svelte";
</script>
<div class="text-bar">
<TextManager />
<Card title="Настройки текста">Настройки текста</Card>
<TextConfig />
</div>
<style>