fix: font style setting only control editor's font (#3117)

Co-authored-by: Alex Yang <himself65@outlook.com>
(cherry picked from commit cfa18d1bc3)
This commit is contained in:
Qi
2023-07-10 19:58:53 +08:00
committed by Alex Yang
parent 1effd9b22e
commit 38521dc8b2
4 changed files with 43 additions and 35 deletions
@@ -58,14 +58,7 @@ const FontFamilySettings = () => {
defaultValue={appSettings.fontStyle}
onValueChange={useCallback(
(key: AppSetting['fontStyle']) => {
const value = fontStyleOptions.find(option => option.key === key)
?.value;
setAppSettings({ fontStyle: key });
document
.querySelector('html')
?.style.setProperty('--affine-font-family', value || null);
},
[setAppSettings]
)}