-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved ref to its own section, without a head, displayed above props
- Loading branch information
Showing
8 changed files
with
74 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 0 additions & 71 deletions
71
packages/react-devtools-shared/src/devtools/views/Components/InspectedElementRefTree.js
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
...s/react-devtools-shared/src/devtools/views/Components/InspectedElementSpecialPropsTree.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow | ||
*/ | ||
|
||
import * as React from 'react'; | ||
import sharedStyles from './InspectedElementSharedStyles.css'; | ||
|
||
// This is a little janky but it keeps the visual styles in sync. | ||
import keyValueStyles from './KeyValue.css'; | ||
|
||
import type {InspectedElement} from './types'; | ||
|
||
type Props = {| | ||
inspectedElement: InspectedElement, | ||
|}; | ||
|
||
export default function InspectedElementSpecialPropsTree({ | ||
inspectedElement, | ||
}: Props) { | ||
const {ref} = inspectedElement; | ||
|
||
if (ref === null) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div className={sharedStyles.InspectedElementTree}> | ||
{ref && ( | ||
<div className={keyValueStyles.Item} style={{paddingLeft: '1rem'}}> | ||
ref | ||
<div className={keyValueStyles.AfterName}>:</div> | ||
<span className={keyValueStyles.Value}>{ref}</span> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters