refactor(classnames): use faster classcat alternative

This commit is contained in:
moklick
2020-07-14 10:11:26 +02:00
parent dec1f973cb
commit 1b3f58486a
11 changed files with 43 additions and 25 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
import React, { useEffect, useState, CSSProperties } from 'react';
import cx from 'classnames';
import cc from 'classcat';
import { getBezierPath } from '../Edges/BezierEdge';
import { getStepPath } from '../Edges/StepEdge';
@@ -46,7 +46,7 @@ export default ({
return null;
}
const connectionLineClasses: string = cx('react-flow__connection', className);
const connectionLineClasses: string = cc(['react-flow__connection', className]);
const sourceHandle = handleId
? sourceNode.__rf.handleBounds[connectionHandleType].find((d: HandleElement) => d.id === handleId)