Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getExtraProps() {
if (Toolkit.TESTING) {
const links = _.keys(this.props.port.getNode().getPort(this.props.port.getName()).links).join(',');
return {
'data-links': links
};
}
return {};
}
import * as React from 'react';
import { storiesOf, addParameters, addDecorator } from '@storybook/react';
import { setOptions } from '@storybook/addon-options';
import { themes } from '@storybook/theming';
import './demos/helpers/index.css';
import { Toolkit } from '@projectstorm/react-canvas-core';
Toolkit.TESTING = true;
addParameters({
options: {
theme: themes.dark
}
});
setOptions({
name: 'STORM React Diagrams',
url: 'https://github.com/projectstorm/react-diagrams',
addonPanelInRight: true
});
addDecorator(fn => {
Toolkit.TESTING_UID = 0;
return fn();