Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
styles={nodes.map(node => ({
key: node.path,
data: node,
style: {
x: spring(node.x, springConfig),
y: spring(node.y, springConfig),
width: spring(node.width, springConfig),
height: spring(node.height, springConfig),
...interpolateColor(node.color, springConfig),
},
}))}
>
export const nodeWillEnter = ({ data }) => ({
scale: 0,
r: 0,
x: data.x,
y: data.y,
...interpolateColor(data.color),
})
const ribbonWillEnter = ({ data: ribbon }) => ({
...getRibbonAngles(ribbon, true),
opacity: 0,
...interpolateColor(ribbon.source.color),
})
styles={nodes.map(node => ({
key: node.path,
data: node,
style: {
scale: spring(1, springConfig),
r: spring(node.r, springConfig),
x: spring(node.x, springConfig),
y: spring(node.y, springConfig),
opacity: spring(1, springConfig),
...interpolateColor(node.color, springConfig),
},
}))}
>
styles={arcs.map(arc => {
return {
key: arc.id,
data: arc,
style: {
startAngle: spring(arc.startAngle, springConfig),
endAngle: spring(arc.endAngle, springConfig),
opacity: spring(getOpacity(arc), springConfig),
...interpolateColor(arc.color, springConfig),
},
}
})}
>
export const nodeWillLeave = springConfig => ({ data }) => ({
scale: spring(0, springConfig),
r: spring(0, springConfig),
x: spring(data.x, springConfig),
y: spring(data.y, springConfig),
...interpolateColor(data.color, springConfig),
})
const ribbonWillLeave = springConfig => ({ data: ribbon }) => ({
...getRibbonAngles(ribbon, true, springConfig),
opacity: 0,
...interpolateColor(ribbon.source.color, springConfig),
})
styles={nodes.map(node => ({
key: node.id,
data: node,
style: {
x: spring(node.x, springConfig),
y: spring(node.y, springConfig),
size: spring(node.size, springConfig),
...interpolateColor(node.color, springConfig),
scale: spring(1, springConfig),
},
}))}
>
styles={nodes.map(node => {
return {
key: node.id,
data: node,
style: {
x: spring(node.x, springProps),
y: spring(node.y, springProps),
width: spring(node.width, springProps),
height: spring(node.height, springProps),
opacity: spring(getOpacity(node), springProps),
...interpolateColor(node.color, springProps),
},
}
})}
>
export const nodeWillEnter = ({ data: node }) => ({
x: node.x,
y: node.y,
width: node.width,
height: node.height,
...interpolateColor(node.color),
})