import React from "react"; import { motion } from "framer-motion"; import { useForm } from "react-hook-form"; import { useAppDispatch, useAppSelector } from "../../store/hook"; import { editor_state, set_options } from "../../store/features/editorSlice"; import { modalVariant } from "./config"; import { theme_state } from "../../store/features/themeSlice"; const SettingsModal = () => { const dispatch = useAppDispatch(); const { options } = useAppSelector(editor_state); const { theme } = useAppSelector(theme_state); const { register, handleSubmit } = useForm(); const onChangeOptions = ({ fontSize, fontWeight, minimapEnabled, minimapScale, wordWrap, autoClosingBrackets, }: any) => { const custom = { fontSize: parseInt(fontSize), fontWeight: fontWeight, minimap: { enabled: minimapEnabled, scale: parseInt(minimapScale), }, wordWrap: wordWrap, autoClosingBrackets: { autoClosingBrackets }, showUnused: true, automaticLayout: true, tabSize: 2, renderLineHighlight: "none", scrollbar: { verticalScrollbarSize: 10, verticalSliderSize: 10 }, }; dispatch(set_options(custom)); }; return ( e.stopPropagation()} >

Settings

{/* Fonts */}
Font size :
Set the font size in pixels.
Font weight :
Defines how bold you text are.
{/* Minimap */}
Enabled minimap :
Control if the minimap should be shown.
Scale :
Set the size of the minimap.
{/* Others */}
Word wrap :
Control if lines should wrap.
Auto Closing Brackets :
Controls if brackets should close automatically
); }; export default SettingsModal;