Getting Started -> Building a Flow -> Getting Started: Fixed style to have 100 height;

master
Jason Zhu 2023-05-29 19:29:21 +10:00
parent 745d8a3a29
commit 310461bd24
1 changed files with 2 additions and 11 deletions

View File

@ -3,19 +3,10 @@ import ReactFlow, { Background, Controls } from 'reactflow';
// we have to import the React Flow styles for it to work // we have to import the React Flow styles for it to work
import 'reactflow/dist/style.css'; import 'reactflow/dist/style.css';
const nodes = [
{
id: '1',
position: { x: 0, y: 0 },
data: { label: 'Hello' },
type: 'input',
},
];
const Flow = () => { const Flow = () => {
return ( return (
<div style={{ height: 800 }}> <div style={{ height: 100 }}>
<ReactFlow nodes={nodes}> <ReactFlow>
<Background /> <Background />
<Controls /> <Controls />
</ReactFlow> </ReactFlow>