mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
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:
@@ -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]
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user