Skip to content

Commit

Permalink
fix(useFontProperties.ts): change default font-family to DEFAULT_FONT
Browse files Browse the repository at this point in the history
The default font-family was hardcoded to "Arial". This commit changes the default value to DEFAULT_FONT, which is defined in atomConfigs. This ensures that the default font-family is consistent throughout the application.
  • Loading branch information
ktun95 committed Feb 14, 2025
1 parent c5827d1 commit 937ce64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/editor-toolbar/src/hooks/useFontProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
fontSizeAtom,
fontFamilyAtom,
FontFamily,
DEFAULT_FONT,
} from "../context/atomConfigs"

const useFontProperties = () => {
Expand All @@ -30,7 +31,7 @@ const useFontProperties = () => {
$getSelectionStyleValueForProperty(
selection,
"font-family",
"Arial",
DEFAULT_FONT,
) as FontFamily,
)
}, [setIsBold, setIsItalic, setIsUnderlined, setFontSize, setFontFamily])
Expand Down

0 comments on commit 937ce64

Please sign in to comment.