mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Disable view-source button rather than hiding it to avoid jumping when selecting new components
This commit is contained in:
@@ -81,15 +81,14 @@ export default function SelectedElement(_: Props) {
|
||||
>
|
||||
<ButtonIcon type="view-dom" />
|
||||
</Button>
|
||||
{canViewSource && (
|
||||
<Button
|
||||
className={styles.IconButton}
|
||||
onClick={viewSource}
|
||||
title="View source for this element"
|
||||
>
|
||||
<ButtonIcon type="view-source" />
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
className={styles.IconButton}
|
||||
disabled={!canViewSource}
|
||||
onClick={viewSource}
|
||||
title="View source for this element"
|
||||
>
|
||||
<ButtonIcon type="view-source" />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{inspectedElement === null && (
|
||||
|
||||
Reference in New Issue
Block a user