chore(examples): only use bundle

This commit is contained in:
moklick
2022-08-09 18:55:32 +02:00
parent affae72f7e
commit 0f835a2961
48 changed files with 194 additions and 513 deletions
+4 -7
View File
@@ -1,5 +1,5 @@
import React from 'react';
import { useStore, useStoreApi } from '@react-flow/core';
import { useStore, useStoreApi } from '@react-flow/bundle';
import styles from './provider.module.css';
@@ -16,19 +16,16 @@ const Sidebar = () => {
return (
<aside className={styles.aside}>
<div className={styles.description}>
This is an example of how you can access the internal state outside of
the ReactFlow component.
This is an example of how you can access the internal state outside of the ReactFlow component.
</div>
<div className={styles.title}>Zoom & pan transform</div>
<div className={styles.transform}>
[{transform[0].toFixed(2)}, {transform[1].toFixed(2)},{' '}
{transform[2].toFixed(2)}]
[{transform[0].toFixed(2)}, {transform[1].toFixed(2)}, {transform[2].toFixed(2)}]
</div>
<div className={styles.title}>Nodes</div>
{Array.from(nodeInternals).map(([, node]) => (
<div key={node.id}>
Node {node.id} - x: {node.position.x.toFixed(2)}, y:{' '}
{node.position.y.toFixed(2)}
Node {node.id} - x: {node.position.x.toFixed(2)}, y: {node.position.y.toFixed(2)}
</div>
))}