@codecademy/gamut-styles
17.13.117.13.2-alpha.c910ea.0
dist/utils/fontUtils.js−
dist/utils/fontUtils.jsDeleted−27
Index: package/dist/utils/fontUtils.js
===================================================================
--- package/dist/utils/fontUtils.js
+++ package/dist/utils/fontUtils.js
@@ -1,27 +0,0 @@
-import { webFonts } from '../remoteAssets/fonts';
-const isThemeName = name => {
- return name in webFonts;
-};
-/**
- * Retrieves font configurations based on the provided theme name.
- *
- * Returns the appropriate font configuration array for the given theme.
- * If no theme name is provided or the theme name is not recognized,
- * returns the core fonts as a fallback.
- *
- * @param themeName - The name of the theme to get fonts for, or undefined
- * @returns A readonly array of FontConfig objects for the specified theme
- *
- * @example
- * ```ts
- * const fonts = getFonts('percipio'); // Returns percipio theme fonts
- * const coreFonts = getFonts(undefined); // Returns core fonts
- * const invalidFonts = getFonts('invalid'); // Returns core fonts as fallback
- * ```
- */
-export const getFonts = themeName => {
- if (!themeName || !isThemeName(themeName)) {
- return webFonts.core;
- }
- return webFonts[themeName];
-};
\ No newline at end of file