refactor(example): cleanup

This commit is contained in:
moklick
2019-09-25 18:50:33 +02:00
parent 4d97a7939f
commit f6513eff10
6 changed files with 77 additions and 55 deletions
+14
View File
@@ -0,0 +1,14 @@
import React from 'react';
import { Handle } from '../../src';
export default({ data, styles }) => (
<div
style={{ background: '#FFCC00', padding: 10, borderRadius: 2, ...styles }}
>
<Handle type="target" position="left" style={{ background: '#999' }} />
<div>{data.input}</div>
<input onChange={(e) => data.onChange(e.target.value, data)} />
<Handle type="source" position="right" style={{ background: '#999' }} />
</div>
);