From a3f1e6872f4f768d14899a1e70bbdc14f32e478d Mon Sep 17 00:00:00 2001
From: Kristóf Marussy <kristof@marussy.com>
Date: Sun, 20 Aug 2023 19:41:32 +0200
Subject: feat: improve semantics error reporting

Also makes model seeds cancellable to reduce server load during semantic
analysis.
---
 subprojects/frontend/src/editor/AnimatedButton.tsx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

(limited to 'subprojects/frontend/src/editor/AnimatedButton.tsx')

diff --git a/subprojects/frontend/src/editor/AnimatedButton.tsx b/subprojects/frontend/src/editor/AnimatedButton.tsx
index dbbda618..24ec69be 100644
--- a/subprojects/frontend/src/editor/AnimatedButton.tsx
+++ b/subprojects/frontend/src/editor/AnimatedButton.tsx
@@ -48,7 +48,7 @@ export default function AnimatedButton({
   onClick?: () => void;
   color: 'error' | 'warning' | 'primary' | 'inherit';
   disabled?: boolean;
-  startIcon: JSX.Element;
+  startIcon?: JSX.Element;
   sx?: SxProps<Theme> | undefined;
   children?: ReactNode;
 }): JSX.Element {
@@ -79,7 +79,11 @@ export default function AnimatedButton({
       className="rounded shaded"
       disabled={disabled ?? false}
       startIcon={startIcon}
-      width={width === undefined ? 'auto' : `calc(${width} + 50px)`}
+      width={
+        width === undefined
+          ? 'auto'
+          : `calc(${width} + ${startIcon === undefined ? 28 : 50}px)`
+      }
     >
       <Box
         display="flex"
@@ -100,6 +104,7 @@ AnimatedButton.defaultProps = {
   'aria-label': undefined,
   onClick: undefined,
   disabled: false,
+  startIcon: undefined,
   sx: undefined,
   children: undefined,
 };
-- 
cgit v1.2.3-54-g00ecf

