Expose fontSize to scopeSettings (for extensions) (#23033)
* Expose fontSize to scopeSettings (for extensions) * Updated comment with fontSize property in IdeProvider context GitOrigin-RevId: 3f622d75aa206f2760a3a9ce0db0f31a91e73089
This commit is contained in:
committed by
Copybot
parent
6fa75eb905
commit
f79e2c8333
@@ -29,6 +29,7 @@ export const IdeProvider: FC<{
|
||||
* - `editor.open_doc_id`,
|
||||
* - `settings.theme`
|
||||
* - `settings.keybindings`
|
||||
* - `settings.fontSize`
|
||||
*/
|
||||
useEffect(() => {
|
||||
window.overleaf = {
|
||||
|
||||
@@ -37,6 +37,7 @@ type UserSettingsContextValue = {
|
||||
type ScopeSettings = {
|
||||
overallTheme: 'light' | 'dark'
|
||||
keybindings: Keybindings
|
||||
fontSize: number
|
||||
}
|
||||
|
||||
export const UserSettingsContext = createContext<
|
||||
@@ -54,6 +55,7 @@ export const UserSettingsProvider: FC = ({ children }) => {
|
||||
setScopeSettings({
|
||||
overallTheme: userSettings.overallTheme === 'light-' ? 'light' : 'dark',
|
||||
keybindings: userSettings.mode === 'none' ? 'default' : userSettings.mode,
|
||||
fontSize: userSettings.fontSize,
|
||||
})
|
||||
}, [setScopeSettings, userSettings])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user