react flow started
This commit is contained in:
parent
5807c92f29
commit
464bd6c6f7
14 changed files with 503 additions and 88 deletions
|
|
@ -1,3 +1,7 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
.App {
|
||||
text-align: center;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,9 @@
|
|||
import React from 'react';
|
||||
import logo from './logo.svg';
|
||||
import './App.css';
|
||||
|
||||
import Flow from "./flow";
|
||||
import "./App.css";
|
||||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<header className="App-header">
|
||||
<img src={logo} className="App-logo" alt="logo" />
|
||||
<p>
|
||||
Edit <code>src/App.tsx</code> and save to reload.
|
||||
</p>
|
||||
<a
|
||||
className="App-link"
|
||||
href="https://reactjs.org"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Learn React
|
||||
</a>
|
||||
</header>
|
||||
<div className="w-screen h-screen">
|
||||
<Flow></Flow>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
15
space_flow/src/flow/index.tsx
Normal file
15
space_flow/src/flow/index.tsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import 'reactflow/dist/style.css';
|
||||
import ReactFlow, { Background, Controls } from 'reactflow';
|
||||
|
||||
|
||||
export default function Flow(){
|
||||
return (
|
||||
//need parent component with width and height
|
||||
<div className='w-full h-full'>
|
||||
<ReactFlow>
|
||||
<Background/>
|
||||
<Controls></Controls>
|
||||
</ReactFlow>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import './index.css';
|
||||
import App from './App';
|
||||
import reportWebVitals from './reportWebVitals';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue