Panel icons

This commit is contained in:
Gregory Schier
2023-03-25 23:29:04 -07:00
parent 6d826064c6
commit d563ac63db
13 changed files with 604 additions and 5 deletions

View File

@@ -180,7 +180,6 @@ function Menu({ className, items, onClose, triggerRect }: MenuProps) {
space={0.5}
ref={initMenu}
style={menuStyles}
tabIndex={-1}
className={classnames(
className,
'h-auto bg-gray-50 rounded-md shadow-lg dark:shadow-gray-0 py-1.5 border',
@@ -232,6 +231,7 @@ function MenuItem({ className, focused, item, onSelect, ...props }: MenuItemProp
return (
<button
ref={initRef}
tabIndex={focused ? 0 : -1}
onMouseEnter={(e) => e.currentTarget.focus()}
onMouseLeave={(e) => e.currentTarget.blur()}
onClick={handleClick}

View File

@@ -33,6 +33,8 @@ import {
TriangleRightIcon,
UpdateIcon,
} from '@radix-ui/react-icons';
import { ReactComponent as LeftPanelHiddenIcon } from '../../assets/icons/LeftPanelHiddenIcon.svg';
import { ReactComponent as LeftPanelVisibleIcon } from '../../assets/icons/LeftPanelVisibleIcon.svg';
import classnames from 'classnames';
import { memo } from 'react';
@@ -54,6 +56,8 @@ const icons = {
gear: GearIcon,
hamburger: HamburgerMenuIcon,
home: HomeIcon,
leftPanelHidden: LeftPanelHiddenIcon,
leftPanelVisible: LeftPanelVisibleIcon,
listBullet: ListBulletIcon,
magicWand: MagicWandIcon,
magnifyingGlass: MagnifyingGlassIcon,