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:
parent
162149a04d
commit
e6d63e0863
1 changed files with 1 additions and 3 deletions
|
@ -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) => {
|
||||||
|
|
Loading…
Reference in a new issue