feat(website): add infobox component
This commit is contained in:
@@ -49,13 +49,19 @@ const elements = [
|
||||
{ id: 'e2-3', source: '2', target: '3' },
|
||||
];
|
||||
|
||||
export default () => <div style={{ height: 300 }}><ReactFlow elements={elements} /></div>;
|
||||
export default () => (
|
||||
<div style={{ height: 300 }}>
|
||||
<ReactFlow elements={elements} />
|
||||
</div>
|
||||
);
|
||||
```
|
||||
|
||||
import Flow from './index';
|
||||
|
||||
<Flow />
|
||||
|
||||
<InfoBox title="Attention!" text="The dimensions of your React Flow component depend on the parents dimensions."/>
|
||||
|
||||
## Basic Functionality
|
||||
|
||||
We don’t do any state updates besides the positions. This means that you need to pass the functions to remove an element or connect nodes by yourself. You can implement your own ones or use the [helper functions](/docs/api/helper-functions/) that come with the library. Here you see an example of how to use the heler functions `removeElements` and `addEdge`.
|
||||
|
||||
Reference in New Issue
Block a user