feat(website): show source code for examples

This commit is contained in:
moklick
2020-10-12 14:27:36 +02:00
parent eeafad3694
commit ae17b99a0c
25 changed files with 364 additions and 398 deletions
+3
View File
@@ -9,6 +9,8 @@ import ReactFlow, {
import ColorPickerNode from './ColorPickerNode';
const windowWidth = typeof window !== 'undefined' ? window.innerWidth : 0;
const hasTouch = typeof window !== 'undefined' && 'ontouchstart' in window;
const isSmallScreen = windowWidth < 800;
const getOffset = () => {
@@ -139,6 +141,7 @@ export default () => {
zoomOnScroll={false}
nodeTypes={nodeTypes}
onConnect={onConnect}
paneMoveable={!hasTouch}
>
<Background />
<Controls showInteractive={false} />