-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDummyContainer.tsx
More file actions
50 lines (41 loc) · 1.07 KB
/
DummyContainer.tsx
File metadata and controls
50 lines (41 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import React, { memo } from 'react'
import styled from 'styled-components'
import memoizeObject from 'utils/memoizeObject'
const memoDummyTransfersStyle = memoizeObject()
const memoDummyPlatformsStyle = memoizeObject()
const DummyPlatforms = styled.g`
opacity: 0;
/* stroke: blue; */
/* stroke-width: 0.5px; */
`
const DummyTransfers = styled.g`
opacity: 0;
& path {
fill: none;
pointer-events: stroke;
}
`
interface Props {
dummyTransfersStrokeWidth: number,
dummyPlatformsStrokeWidth: number,
mountDummyTransfers: (g: SVGGElement) => void,
mountDummyPlatforms: (g: SVGGElement) => void,
}
const DummyContainer = (props: Props) => (
<>
<DummyTransfers
ref={props.mountDummyTransfers}
style={memoDummyTransfersStyle({
stroke: 'black',
strokeWidth: `${props.dummyTransfersStrokeWidth}px`,
})}
/>
<DummyPlatforms
ref={props.mountDummyPlatforms}
style={memoDummyPlatformsStyle({
strokeWidth: `${props.dummyPlatformsStrokeWidth}px`,
})}
/>
</>
)
export default memo(DummyContainer)