refactor(wrapNode): no border styles

This commit is contained in:
moklick
2019-07-16 13:45:25 +02:00
parent a431148890
commit d65121d197
6 changed files with 49 additions and 22 deletions
+7 -1
View File
@@ -2,8 +2,14 @@ import React from 'react';
import Handle from '../Handle';
const nodeStyles = {
background: '#ff6060',
padding: 10,
borderRadius: 5
};
export default ({ data, style }) => (
<div style={{ background: '#ff6060', padding: '10px', ...style }}>
<div style={{ ...nodeStyles, ...style }}>
<Handle style={{ top: 0 }} />
{data.label}
<Handle style={{ bottom: 0, top: 'auto', transform: 'translate(-50%, 50%)' }} />
+7 -1
View File
@@ -2,8 +2,14 @@ import React from 'react';
import Handle from '../Handle';
const nodeStyles = {
background: '#9999ff',
padding: 10,
borderRadius: 5
};
export default ({ data, style }) => (
<div style={{ background: '#9999ff', padding: '10px', ...style }}>
<div style={{ ...nodeStyles, ...style }}>
{data.label}
<Handle style={{ bottom: 0, top: 'auto', transform: 'translate(-50%, 50%)' }} />
</div>
+7 -1
View File
@@ -2,8 +2,14 @@ import React from 'react';
import Handle from '../Handle';
const nodeStyles = {
background: '#55ff99',
padding: 10,
borderRadius: 5
};
export default ({ data, style }) => (
<div style={{ background: '#55ff99', padding: '10px', ...style }}>
<div style={{ ...nodeStyles, ...style }}>
<Handle style={{ top: 0 }} />
{data.label}
</div>