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 from 'react';
import classnames from 'classnames';
import cc from 'classcat';
import { useStoreState, useStoreActions } from '../../store/hooks';
@@ -24,7 +24,7 @@ const Controls = ({ style, showZoom = true, showFitView = true, showInteractive
const zoomOut = useStoreActions((actions) => actions.zoomOut);
const isInteractive = useStoreState((s) => s.nodesDraggable && s.nodesConnectable && s.elementsSelectable);
const mapClasses = classnames('react-flow__controls', className);
const mapClasses = cc(['react-flow__controls', className]);
return (
<div className={mapClasses} style={style}>