aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/ContextMenu.tsx
diff options
context:
space:
mode:
authorSophie Zhang <sophie_zhang@brown.edu>2023-07-18 15:06:22 -0400
committerSophie Zhang <sophie_zhang@brown.edu>2023-07-18 15:06:22 -0400
commit40784b7265851b27e043c07e5f9038a0b29af8b7 (patch)
tree1f9e154913820cc1cb5952a9d444d9a0eca86c29 /src/client/views/ContextMenu.tsx
parent162ca319eae256be523f2ee75e7aae7a9a408e37 (diff)
parent267f5d7c6a87b955c2fa2121c6db7e01cfc1c148 (diff)
Merge branch 'master' into sophie-ai-images
Diffstat (limited to 'src/client/views/ContextMenu.tsx')
-rw-r--r--src/client/views/ContextMenu.tsx13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/client/views/ContextMenu.tsx b/src/client/views/ContextMenu.tsx
index e4c3e864b..d54d4dc7b 100644
--- a/src/client/views/ContextMenu.tsx
+++ b/src/client/views/ContextMenu.tsx
@@ -5,6 +5,8 @@ import { observer } from 'mobx-react';
import './ContextMenu.scss';
import { ContextMenuItem, ContextMenuProps, OriginalMenuProps } from './ContextMenuItem';
import { Utils } from '../../Utils';
+import { StrCast } from '../../fields/Types';
+import { Doc } from '../../fields/Doc';
@observer
export class ContextMenu extends React.Component {
@@ -190,7 +192,11 @@ export class ContextMenu extends React.Component {
}
return this.filteredItems.map((value, index) =>
Array.isArray(value) ? (
- <div className="contextMenu-group">
+ <div className="contextMenu-group"
+ style={{
+ background: StrCast(Doc.UserDoc().userVariantColor)
+ }}
+ >
<div className="contextMenu-description">{value.join(' -> ')}</div>
</div>
) : (
@@ -213,7 +219,10 @@ export class ContextMenu extends React.Component {
this._height = Number(getComputedStyle(r).height.replace('px', ''));
}
})}
- style={{ left: this.pageX, ...(this._yRelativeToTop ? { top: this.pageY } : { bottom: this.pageY }) }}>
+ style={{
+ left: this.pageX, ...(this._yRelativeToTop ? { top: this.pageY } : { bottom: this.pageY }),
+ background: StrCast(Doc.UserDoc().userBackgroundColor)
+ }}>
{!this.itemsNeedSearch ? null : (
<span className={'search-icon'}>
<span className="icon-background">