style(comps): dont use inline styles for minimap and edges #491

This commit is contained in:
moklick
2020-10-06 18:00:08 +02:00
parent 0c63b08a86
commit 011e4c0aaf
5 changed files with 20 additions and 27 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ const defaultWidth = 200;
const defaultHeight = 150;
const MiniMap = ({
style = { backgroundColor: '#fff' },
style,
className,
nodeStrokeColor = '#555',
nodeColor = '#fff',
@@ -36,8 +36,8 @@ const MiniMap = ({
const nodes = useStoreState((s) => s.nodes);
const mapClasses = cc(['react-flow__minimap', className]);
const elementWidth = (style.width || defaultWidth)! as number;
const elementHeight = (style.height || defaultHeight)! as number;
const elementWidth = (style?.width || defaultWidth)! as number;
const elementHeight = (style?.height || defaultHeight)! as number;
const nodeColorFunc = (nodeColor instanceof Function ? nodeColor : () => nodeColor) as StringFunc;
const nodeStrokeColorFunc = (nodeStrokeColor instanceof Function
? nodeStrokeColor
+2 -1
View File
@@ -3,4 +3,5 @@
z-index: 5;
bottom: 10px;
right: 10px;
}
background-color: #fff;
}