glyphi.svelte (585B)
1 <script lang="ts"> 2 import type { IGlyphI } from "$lib/types/components"; 3 import { fmt_cl } from "$lib/utils/app"; 4 5 const GLYPH_SIZE_CLASSES = { 6 xs: `text-[16px]`, 7 sm: `text-[20px]`, 8 md: `text-[26px]`, 9 lg: `text-[32px]`, 10 xl: `text-[48px]`, 11 "2xl": "text-[64px]", 12 }; 13 14 let { basis }: { basis: IGlyphI } = $props(); 15 </script> 16 17 <i 18 class={`ph${!basis?.weight || basis?.weight === `regular` ? `` : `-${basis?.weight}`} ph-${basis.key} ${fmt_cl(basis.classes)} ${basis.size ? GLYPH_SIZE_CLASSES[basis.size] : ""}`} 19 > 20 </i>