Sacha Sayan 7 месяцев назад
Родитель
Сommit
145ce6e7b5
1 измененных файлов с 8 добавлено и 0 удалено
  1. 8 0
      webview-ui/src/components/common/MermaidBlock.tsx

+ 8 - 0
webview-ui/src/components/common/MermaidBlock.tsx

@@ -306,4 +306,12 @@ const SvgContainer = styled.div<SvgContainerProps>`
 	cursor: pointer;
 	display: flex;
 	justify-content: center;
+	max-height: 400px;
+
+	/* Ensure the SVG scales within the container */
+	& > svg {
+		display: block; /* Ensure block layout */
+		width: 100%;
+		max-height: 100%; /* Respect container's max-height */
+	}
 `