From 67db6e22a722be305f6db36d952246b6aef541c7 Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Mon, 26 Jan 2026 12:45:30 +0300 Subject: [PATCH] feat(ComparisonSlider): rewrite slider labels to include selects for compared fonts --- .../ComparisonSlider/components/Labels.svelte | 119 ++++++++++++++---- 1 file changed, 96 insertions(+), 23 deletions(-) diff --git a/src/widgets/ComparisonSlider/ui/ComparisonSlider/components/Labels.svelte b/src/widgets/ComparisonSlider/ui/ComparisonSlider/components/Labels.svelte index 0c01646..81ece04 100644 --- a/src/widgets/ComparisonSlider/ui/ComparisonSlider/components/Labels.svelte +++ b/src/widgets/ComparisonSlider/ui/ComparisonSlider/components/Labels.svelte @@ -1,37 +1,110 @@ - - -
- +{#snippet fontSelector( + name: string, + id: string, + fonts: UnifiedFont[], + handleChange: (value: string) => void, +)}
e.stopPropagation())} > - Baseline - - {fontB.name} - + + + + {name} + + + + + {#snippet children({ item: font })} + + + {font.name} + + + {/snippet} + + + +
+{/snippet} + +
+
+ + Baseline + {@render fontSelector(fontB.name, fontB.id, fontList, selectFontB)}
-
90 ? 0 : 1} + style:opacity={sliderPos > 85 ? 0 : 1} > - Comparison - - {fontA.name} - + + Comparison + {@render fontSelector(fontA.name, fontA.id, fontList, selectFontA)}