diff --git a/src/components/Workflow/StaticGraphContainer.tsx b/src/components/Workflow/StaticGraphContainer.tsx index f03fbec2b..5b14c1336 100644 --- a/src/components/Workflow/StaticGraphContainer.tsx +++ b/src/components/Workflow/StaticGraphContainer.tsx @@ -42,11 +42,12 @@ export interface StaticGraphContainerProps { export const StaticGraphContainer: React.FC = ({ workflowId }) => { - const containerStyle = { - width: '100%', - height: '30%', - maxHeight: '400px', - minHeight: '220px' + const containerStyle: React.CSSProperties = { + display: 'flex', + flexDirection: 'column', + flex: `1 1 100%`, + minHeight: 300, + padding: '1rem 0' }; const workflowQuery = useQuery( makeWorkflowQuery(useQueryClient(), workflowId) diff --git a/src/components/flytegraph/ReactFlow/ReactFlowGraphComponent.tsx b/src/components/flytegraph/ReactFlow/ReactFlowGraphComponent.tsx index 2c3b8d9ad..ed81f297f 100644 --- a/src/components/flytegraph/ReactFlow/ReactFlowGraphComponent.tsx +++ b/src/components/flytegraph/ReactFlow/ReactFlowGraphComponent.tsx @@ -25,11 +25,20 @@ const ReactFlowGraphComponent = props => { rfGraphJson: rfGraphJson, type: RFGraphTypes.main }; + + const containerStyle: React.CSSProperties = { + display: 'flex', + flex: `1 1 100%`, + flexDirection: 'column', + minHeight: '100px', + minWidth: '200px' + }; + return ( - <> +
- +
); }; diff --git a/src/components/flytegraph/ReactFlow/ReactFlowWrapper.tsx b/src/components/flytegraph/ReactFlow/ReactFlowWrapper.tsx index 1a2144fd8..e897721d4 100644 --- a/src/components/flytegraph/ReactFlow/ReactFlowWrapper.tsx +++ b/src/components/flytegraph/ReactFlow/ReactFlowWrapper.tsx @@ -134,7 +134,9 @@ export const ReactFlowWrapper: React.FC = ({ * React Flow's min height to make it render */ const reactFlowStyle: React.CSSProperties = { - minHeight: 220 + display: 'flex', + flex: `1 1 100%`, + flexDirection: 'column' }; return (