0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Fixed custom fonts not styled in select dropdown

This commit is contained in:
Aileen Booker 2024-10-24 16:10:44 +04:00 committed by Aileen Booker
parent 162149a04d
commit e6d63e0863

View file

@ -52,9 +52,7 @@ const GlobalSettings: React.FC<{ values: GlobalSettingValues, updateSetting: (ke
const [headingFont, setHeadingFont] = useState(values.headingFont || DEFAULT_FONT); const [headingFont, setHeadingFont] = useState(values.headingFont || DEFAULT_FONT);
const [bodyFont, setBodyFont] = useState(values.bodyFont || DEFAULT_FONT); const [bodyFont, setBodyFont] = useState(values.bodyFont || DEFAULT_FONT);
const fontClassName = (fontName: string, heading: boolean = true) => { const fontClassName = (fontName: string, heading: boolean = true) => clsx(`font-${getCSSFriendlyFontClassName(fontName)}`, heading && 'font-bold');
return clsx(getCSSFriendlyFontClassName(fontName), heading && 'font-bold');
};
// Populate the heading and body font options // Populate the heading and body font options
const customHeadingFonts: HeadingFontOption[] = CUSTOM_FONTS.heading.map((x) => { const customHeadingFonts: HeadingFontOption[] = CUSTOM_FONTS.heading.map((x) => {