Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
{
key: 'linkThickness',
enableControlForFlavors: ['canvas'],
group: 'Links',
type: 'number | (link: Link) => number',
help: `Control links' thickness.`,
defaultValue: NetworkDefaultProps.linkThickness,
controlType: 'lineWidth',
},
{
key: 'linkColor',
group: 'Links',
type: 'string | (link: Link) => string',
help: `Control links' color.`,
defaultValue: NetworkDefaultProps.linkColor,
controlType: 'inheritedColor',
controlOptions: {
inheritableProperties: ['source.color', 'target.color'],
},
},
{
key: 'layers',
group: 'Customization',
help: 'Defines the order of layers and add custom layers.',
required: false,
defaultValue: NetworkDefaultProps.layers,
},
...motionProperties(['svg'], NetworkDefaultProps),
]
export const groups = groupProperties(props)bottom: 0,
left: 0,
},
linkDistance: 30,
repulsivity: 6,
iterations: 60,
nodeColor: node => node.color,
nodeBorderWidth: 1,
nodeBorderColor: {
from: 'color',
modifiers: [['darker', 0.8]],
},
linkColor: NetworkDefaultProps.linkColor,
linkThickness: link => (2 - link.source.depth) * 2,
isInteractive: true,
animate: true,
motionStiffness: 160,
motionDamping: 12,
})
const Network = () => {
return (