Skip to content
Snippets Groups Projects
Commit 6f543ae3 authored by Ben Wheeler's avatar Ben Wheeler
Browse files

Refactored the css for sprite context menu items a bit to separate classes

parent 97f22416
No related branches found
No related tags found
No related merge requests found
...@@ -17,23 +17,20 @@ ...@@ -17,23 +17,20 @@
z-index: $z-index-context-menu; z-index: $z-index-context-menu;
} }
.menu-item, .menu-item-bordered { .menu-item {
padding: 8px 12px; padding: 8px 12px;
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
transition: 0.1s ease; transition: 0.1s ease;
} }
.menu-item-bordered { .menu-item:hover {
border-top: 3px solid $text-primary; background: $motion-primary;
}
.menu-item:hover, .menu-item-bordered:hover {
color: white; color: white;
} }
.menu-item:hover { .menu-item-bordered {
background: $motion-primary; border-top: 2px solid $text-primary-transparent;
} }
.menu-item-bordered:hover { .menu-item-bordered:hover {
......
import React from 'react'; import React from 'react';
import {ContextMenu, MenuItem} from 'react-contextmenu'; import {ContextMenu, MenuItem} from 'react-contextmenu';
import classNames from 'classnames';
import styles from './context-menu.css'; import styles from './context-menu.css';
...@@ -20,7 +21,7 @@ const StyledMenuItem = props => ( ...@@ -20,7 +21,7 @@ const StyledMenuItem = props => (
const BorderedMenuItem = props => ( const BorderedMenuItem = props => (
<MenuItem <MenuItem
{...props} {...props}
attributes={{className: styles.menuItemBordered}} attributes={{className: classNames(styles.menuItem, styles.menuItemBordered)}}
/> />
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment