feat(displayedFontsStore): create store to manage displayed fonts sample and its content

This commit is contained in:
Ilia Mashkov committed 2026-01-18 14:55:00 +03:00
1 parent e0e0d929bb
commit f457e5116f
4 files changed
+25

No files matched your search

View File
Whitespace-only changes.
+1
View File
@@ -0,0 +1 @@
export { displayedFontsStore } from './store';
@@ -0,0 +1,23 @@
import { selectedFontsStore } from '$entities/Font';
export class DisplayedFontsStore {
#sampleText = $state('The quick brown fox jumps over the lazy dog');
#displayedFonts = $derived.by(() => {
return selectedFontsStore.all;
});
get fonts() {
return this.#displayedFonts;
}
get text() {
return this.#sampleText;
}
set text(text: string) {
this.#sampleText = text;
}
}
export const displayedFontsStore = new DisplayedFontsStore();
@@ -0,0 +1 @@
export { displayedFontsStore } from './displayedFontsStore.svelte';