doc: comments for codebase and updated documentation
This commit is contained in:
@@ -1,19 +1,31 @@
|
||||
<!--
|
||||
Component: FontApplicator
|
||||
|
||||
Loads fonts from fontshare with link tag
|
||||
- Loads font only if it's not already applied
|
||||
- Uses IntersectionObserver to detect when font is visible
|
||||
- Adds smooth transition when font is loaded
|
||||
-->
|
||||
<script lang="ts">
|
||||
import {
|
||||
appliedFontsManager,
|
||||
} from '$entities/Font/model/store/appliedFontsStore/appliedFontsStore.svelte';
|
||||
import { cn } from '$shared/shadcn/utils/shadcn-utils';
|
||||
import type { Snippet } from 'svelte';
|
||||
import { appliedFontsManager } from '../../model';
|
||||
|
||||
interface Props {
|
||||
/**
|
||||
* Font name to set
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* Font id to load
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* Additional classes
|
||||
*/
|
||||
className?: string;
|
||||
/**
|
||||
* Children
|
||||
*/
|
||||
children?: Snippet;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user