feat(appliedFontsStore): incorporate implemented font weight logic

This commit is contained in:
Ilia Mashkov
2026-01-20 14:21:07 +03:00
parent 55a560b785
commit d4d2d68d9a
4 changed files with 32 additions and 18 deletions

View File

@@ -7,6 +7,7 @@ import {
FontApplicator,
type UnifiedFont,
} from '$entities/Font';
import { controlManager } from '$features/SetupFont';
import { ContentEditable } from '$shared/ui';
interface Props {
@@ -31,6 +32,8 @@ let {
text = $bindable(),
...restProps
}: Props = $props();
const weight = $derived(controlManager.weight ?? 400);
</script>
<div
@@ -39,6 +42,7 @@ let {
bg-white p-6 border border-slate-200
shadow-sm dark:border-slate-800 dark:bg-slate-950
"
style:font-weight={weight}
>
<FontApplicator id={font.id} name={font.name}>
<ContentEditable bind:text={text} {...restProps} />