react flow started

This commit is contained in:
anovazzi1 2023-02-08 20:15:01 -03:00
commit 464bd6c6f7
14 changed files with 503 additions and 88 deletions

View file

@ -1,3 +1,7 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
.App {
text-align: center;
}

View file

@ -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>
);
}

View 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>
)
}

View file

@ -1,3 +1,5 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',

View file

@ -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';