refactor(wrapNode): no border styles
This commit is contained in:
@@ -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%)' }} />
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user