fix: yaml edior height

This commit is contained in:
jialin
2026-03-10 19:06:49 +08:00
parent 73e52fe334
commit 972e147fdf
3 changed files with 21 additions and 7 deletions
+6 -4
View File
@@ -18,9 +18,7 @@ const { Text } = Typography;
loader.config({ monaco });
const Container = styled.div<{ $minHeight: string | number }>`
min-height: ${({ $minHeight }) =>
typeof $minHeight === 'number' ? `${$minHeight}px` : $minHeight};
const Container = styled.div`
position: relative;
border: 1px solid var(--ant-color-border);
border-radius: var(--ant-border-radius);
@@ -153,7 +151,11 @@ const YamlEditor: React.FC<ViewerProps> = forwardRef((props, ref) => {
}, [value]);
return (
<Container $minHeight={height}>
<Container
style={{
minHeight: height
}}
>
<EditorInner
ref={editorRef}
header={renderHeader()}