From 2f72b6f32f1ff96312bfb3c853c157d496a23a41 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 1 Jul 2026 06:21:21 +0000 Subject: [PATCH] refactor(configurator): dedupe mobile fold-toggle button markup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extract the near-identical Controls/Preview toggle buttons into a single foldToggleButton snippet, parameterized by view, icon, and label. No behavior change — same active-state styling, same overrides badge on Preview only. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01SQXr34nocCi1jrGcp5TPVm --- configurator/src/App.svelte | 38 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/configurator/src/App.svelte b/configurator/src/App.svelte index 02d0eb31..3c3f068b 100644 --- a/configurator/src/App.svelte +++ b/configurator/src/App.svelte @@ -241,6 +241,21 @@ }); +{#snippet foldToggleButton(view: "controls" | "preview", Icon: typeof SlidersHorizontal, label: string)} + +{/snippet} +
- - + {@render foldToggleButton("controls", SlidersHorizontal, "Controls")} + {@render foldToggleButton("preview", Eye, "Preview")}