mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
* Added rudimentary context menu hook and menu UI * Added backend support for copying a value at a specific path for the inspected element * Added backend support for storing a value (at a specified path) as a global variable * Added special casing to enable copying undefined/unserializable values to the clipboard * Added copy and store-as-global context menu options to selected element props panel * Store global variables separately, with auto-incremented name (like browsers do) * Added tests for new copy and store-as-global backend functions * Fixed some ownerDocument/contentWindow edge cases * Refactored context menu to support dynamic options Used this mechanism to add a conditional menu option for inspecting the current value (if it's a function) * Renamed "safeSerialize" to "serializeToString" and added inline comment
22 lines
592 B
CSS
22 lines
592 B
CSS
.ContextMenuItem {
|
|
display: flex;
|
|
align-items: center;
|
|
color: var(--color-context-text);
|
|
padding: 0.5rem 0.75rem;
|
|
cursor: default;
|
|
border-top: 1px solid var(--color-context-border);
|
|
font-family: var(--font-family-sans);
|
|
font-size: var(--font-size-sans-normal);
|
|
}
|
|
.ContextMenuItem:first-of-type {
|
|
border-top: none;
|
|
}
|
|
.ContextMenuItem:hover,
|
|
.ContextMenuItem:focus {
|
|
outline: 0;
|
|
background-color: var(--color-context-background-hover);
|
|
}
|
|
.ContextMenuItem:active {
|
|
background-color: var(--color-context-background-selected);
|
|
color: var(--color-context-text-selected);
|
|
} |