diff --git a/src/frontend/src/modals/IOModal/index.tsx b/src/frontend/src/modals/IOModal/index.tsx index f734977d8..49283ece0 100644 --- a/src/frontend/src/modals/IOModal/index.tsx +++ b/src/frontend/src/modals/IOModal/index.tsx @@ -34,25 +34,25 @@ export default function IOModal({ }: IOModalPropsType): JSX.Element { const allNodes = useFlowStore((state) => state.nodes); const inputs = useFlowStore((state) => state.inputs).filter( - (input) => input.type !== "ChatInput" + (input) => input.type !== "ChatInput", ); const chatInput = useFlowStore((state) => state.inputs).find( - (input) => input.type === "ChatInput" + (input) => input.type === "ChatInput", ); const outputs = useFlowStore((state) => state.outputs).filter( - (output) => output.type !== "ChatOutput" + (output) => output.type !== "ChatOutput", ); const chatOutput = useFlowStore((state) => state.outputs).find( - (output) => output.type === "ChatOutput" + (output) => output.type === "ChatOutput", ); const nodes = useFlowStore((state) => state.nodes).filter( (node) => inputs.some((input) => input.id === node.id) || - outputs.some((output) => output.id === node.id) + outputs.some((output) => output.id === node.id), ); const haveChat = chatInput || chatOutput; const [selectedTab, setSelectedTab] = useState( - inputs.length > 0 ? 1 : outputs.length > 0 ? 2 : 0 + inputs.length > 0 ? 1 : outputs.length > 0 ? 2 : 0, ); function startView() { @@ -117,7 +117,7 @@ export default function IOModal({ return ( {nodes .filter((node) => - inputs.some((input) => input.id === node.id) + inputs.some((input) => input.id === node.id), ) .map((node, index) => { const input = inputs.find( - (input) => input.id === node.id + (input) => input.id === node.id, )!; return (
{nodes .filter((node) => - outputs.some((output) => output.id === node.id) + outputs.some((output) => output.id === node.id), ) .map((node, index) => { const output = outputs.find( - (output) => output.id === node.id + (output) => output.id === node.id, )!; return (
@@ -327,7 +327,7 @@ export default function IOModal({
{inputs.some( - (input) => input.id === selectedViewField.id + (input) => input.id === selectedViewField.id, ) ? ( {haveChat ? ( @@ -384,7 +384,7 @@ export default function IOModal({ "h-4 w-4", isBuilding ? "animate-spin" - : "fill-current text-medium-indigo" + : "fill-current text-medium-indigo", )} /> Run Flow diff --git a/src/frontend/src/modals/baseModal/index.tsx b/src/frontend/src/modals/baseModal/index.tsx index 15a471fff..2b6daf767 100644 --- a/src/frontend/src/modals/baseModal/index.tsx +++ b/src/frontend/src/modals/baseModal/index.tsx @@ -63,7 +63,7 @@ interface BaseModalProps { React.ReactElement, React.ReactElement, React.ReactElement?, - React.ReactElement? + React.ReactElement?, ]; open?: boolean; setOpen?: (open: boolean) => void; @@ -78,6 +78,7 @@ interface BaseModalProps { | "large-h-full" | "small-h-full" | "medium-h-full" + | "md-thin" | "smaller-h-full"; disable?: boolean; @@ -93,16 +94,16 @@ function BaseModal({ type = "dialog", }: BaseModalProps) { const headerChild = React.Children.toArray(children).find( - (child) => (child as React.ReactElement).type === Header + (child) => (child as React.ReactElement).type === Header, ); const triggerChild = React.Children.toArray(children).find( - (child) => (child as React.ReactElement).type === Trigger + (child) => (child as React.ReactElement).type === Trigger, ); const ContentChild = React.Children.toArray(children).find( - (child) => (child as React.ReactElement).type === Content + (child) => (child as React.ReactElement).type === Content, ); const ContentFooter = React.Children.toArray(children).find( - (child) => (child as React.ReactElement).type === Footer + (child) => (child as React.ReactElement).type === Footer, ); let minWidth: string; @@ -147,6 +148,12 @@ function BaseModal({ minWidth = "min-w-[65vw]"; height = "h-[80vh]"; break; + + case "md-thin": + minWidth = "min-w-[85vw]"; + height = "h-[70vh]"; + break; + case "large-h-full": minWidth = "min-w-[80vw]"; break;