diff --git a/src/widgets/ComparisonSlider/ui/ComparisonSlider/components/FontList.svelte b/src/widgets/ComparisonSlider/ui/ComparisonSlider/components/FontList.svelte new file mode 100644 index 0000000..bcbf0cc --- /dev/null +++ b/src/widgets/ComparisonSlider/ui/ComparisonSlider/components/FontList.svelte @@ -0,0 +1,202 @@ + + + +{#snippet rightBrackets(className?: string)} + + + + + + + +{/snippet} + +{#snippet leftBrackets(className?: string)} + + + + + + +{/snippet} + +{#snippet brackets(renderLeft?: boolean, renderRight?: boolean, className?: string)} + {#if renderLeft} + {@render leftBrackets(className)} + {/if} + {#if renderRight} + {@render rightBrackets(className)} + {/if} +{/snippet} + +
+
+ + {#snippet children({ item: font })} + {@const isSelectedA = isFontA(font)} + {@const isSelectedB = isFontB(font)} + {@const isEither = isSelectedA || isSelectedB} + {@const isBoth = isSelectedA && isSelectedB} + {@const handleSelectFontA = () => selectFontA(font)} + {@const handleSelectFontB = () => selectFontB(font)} + +
+
+
+ + --- {font.name} --- + +
+
+ + + + +
+ {/snippet} +
+
+