diff --git a/packages/bruno-app/src/components/Preferences/Font/index.js b/packages/bruno-app/src/components/Preferences/Font/index.js
index 2f27fea8b..ef6ac9f2f 100644
--- a/packages/bruno-app/src/components/Preferences/Font/index.js
+++ b/packages/bruno-app/src/components/Preferences/Font/index.js
@@ -9,17 +9,25 @@ const Font = ({ close }) => {
const preferences = useSelector((state) => state.app.preferences);
const [codeFont, setCodeFont] = useState(get(preferences, 'font.codeFont', 'default'));
+ const [codeFontSize, setCodeFontSize] = useState(get(preferences, 'font.codeFontSize', '14'));
- const handleInputChange = (event) => {
+ const handleCodeFontChange = (event) => {
setCodeFont(event.target.value);
};
+ const handleCodeFontSizeChange = (event) => {
+ // Restrict to min/max value
+ const clampedSize = Math.max(1, Math.min(event.target.value, 32));
+ setCodeFontSize(clampedSize);
+ };
+
const handleSave = () => {
dispatch(
savePreferences({
...preferences,
font: {
- codeFont
+ codeFont,
+ codeFontSize
}
})
).then(() => {
@@ -29,17 +37,33 @@ const Font = ({ close }) => {
return (
-
-
+