Fix input height

This commit is contained in:
IRBorisov 2023-08-13 01:10:46 +03:00
parent 616ceebcb3
commit 27f515f5d3
2 changed files with 2 additions and 3 deletions

View File

@ -52,7 +52,6 @@ extends Omit<ReactCodeMirrorProps, 'onChange'> {
function RSInput({ function RSInput({
innerref, onChange, editable, innerref, onChange, editable,
height='10rem',
...props ...props
}: RSInputProps) { }: RSInputProps) {
const { darkMode } = useConceptTheme(); const { darkMode } = useConceptTheme();
@ -99,12 +98,11 @@ function RSInput({
}), [editable]); }), [editable]);
return ( return (
<div className={`w-full h-[${height}] ${cursor} text-lg`}> <div className={`w-full ${cursor} text-lg`}>
<CodeMirror <CodeMirror
ref={innerref} ref={innerref}
basicSetup={editorSetup} basicSetup={editorSetup}
extensions={editorExtensions} extensions={editorExtensions}
height={height}
indentWithTab={false} indentWithTab={false}
theme={darkMode ? darkTheme : lightTheme} theme={darkMode ? darkTheme : lightTheme}
onChange={value => onChange(value)} onChange={value => onChange(value)}

View File

@ -227,6 +227,7 @@ function EditorRSExpression({
/> />
<RSInput innerref={rsInput} <RSInput innerref={rsInput}
className='mt-2' className='mt-2'
height='10.1rem'
value={value} value={value}
placeholder={placeholder} placeholder={placeholder}
editable={!disabled} editable={!disabled}