Removed non-functioning tree arrows (for now)
Brian Vaughn committed
Feb 8, 2019 at 16:16 UTC
baa6142801fb76614b15808afcb7b420e6af6597
2 files changed
+2
-28
src/devtools/views/Element.css
-12
@@ -30,18 +30,6 @@
30
color: var(--color-tree-jsx-arrow-brackets);
31
}
32
33
-.ArrowClosed,
34
-.ArrowOpen {
35
- position: absolute;
36
- margin-left: -1rem;
37
- width: 1rem;
38
- height: 1rem;
39
- color: var(--color-arrow);
40
-}
41
-.ArrowOpen {
42
- transform: rotate(90deg);
43
-}
44
-
33
.Component {
34
color: var(--color-component-name);
35
}
src/devtools/views/Element.js
+2
-16
@@ -4,7 +4,6 @@ import React, { Fragment, useCallback, useContext, useMemo } from 'react';
4
import { ElementTypeClassOrFunction } from 'src/devtools/types';
5
import { createRegExp } from './utils';
6
import { TreeContext } from './TreeContext';
7
-import Icon from './Icon';
7
8
import type { Element } from '../types';
9
@@ -25,14 +24,7 @@ export default function ElementView({ index, style }: Props) {
24
} = useContext(TreeContext);
25
26
const element = getElementAtIndex(index);
28
- const {
29
- children,
30
- depth,
31
- displayName,
32
- id,
33
- key,
34
- type,
35
- } = ((element: any): Element);
27
+ const { depth, displayName, id, key, type } = ((element: any): Element);
28
29
const handleDoubleClick = useCallback(() => selectOwner(id), [id]);
30
@@ -53,15 +45,9 @@ export default function ElementView({ index, style }: Props) {
45
onDoubleClick={handleDoubleClick}
46
style={{
47
...style, // "style" comes from react-window
56
- paddingLeft: `${1 + depth - baseDepth}rem`,
48
+ paddingLeft: `${depth - baseDepth}.25rem`,
49
}}
50
>
59
- {children.length > 0 && (
60
- <span className={styles.ArrowOpen}>
61
- <Icon type="arrow" />
62
- </span>
63
- )}
64
-
51
<span className={styles.Component}>
52
<DisplayName displayName={displayName} id={id} />
53
{key && (