Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
3008845d
Commit
3008845d
authored
Apr 12, 2024
by
Alejandro Celaya
Committed by
Alejandro Celaya
Apr 12, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove pointer and hover on disabled menu items
parent
b4eac256
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
MenuItem.tsx
src/sidebar/components/MenuItem.tsx
+6
-3
No files found.
src/sidebar/components/MenuItem.tsx
View file @
3008845d
...
@@ -239,10 +239,11 @@ export default function MenuItem({
...
@@ -239,10 +239,11 @@ export default function MenuItem({
const
wrapperClasses
=
classnames
(
const
wrapperClasses
=
classnames
(
'focus-visible-ring ring-inset'
,
'focus-visible-ring ring-inset'
,
'w-full min-w-[150px] flex items-center select-none'
,
'w-full min-w-[150px] flex items-center select-none'
,
'rounded-none
cursor-pointer
'
,
'rounded-none'
,
{
{
'focus-visible:rounded-lg'
:
!
isSelected
,
'focus-visible:rounded-lg'
:
!
isSelected
,
'focus-visible:rounded-r-lg'
:
isSelected
,
'focus-visible:rounded-r-lg'
:
isSelected
,
'cursor-pointer'
:
!
isDisabled
,
},
},
// Set this container as a "group" so that children may style based on its
// Set this container as a "group" so that children may style based on its
// layout state.
// layout state.
...
@@ -251,8 +252,10 @@ export default function MenuItem({
...
@@ -251,8 +252,10 @@ export default function MenuItem({
{
{
'min-h-[30px] font-normal'
:
isSubmenuItem
,
'min-h-[30px] font-normal'
:
isSubmenuItem
,
'min-h-[40px] font-medium'
:
!
isSubmenuItem
,
'min-h-[40px] font-medium'
:
!
isSubmenuItem
,
'bg-grey-1 hover:bg-grey-3'
:
isSubmenuItem
||
isExpanded
,
'bg-grey-1'
:
isSubmenuItem
||
isExpanded
,
'bg-white hover:bg-grey-1'
:
!
isSubmenuItem
&&
!
isExpanded
,
'hover:bg-grey-3'
:
!
isDisabled
&&
(
isSubmenuItem
||
isExpanded
),
'bg-white'
:
!
isSubmenuItem
&&
!
isExpanded
,
'hover:bg-grey-1'
:
!
isDisabled
&&
!
isSubmenuItem
&&
!
isExpanded
,
// visual "padding" on the right is part of SubmenuToggle when rendered,
// visual "padding" on the right is part of SubmenuToggle when rendered,
// but when not rendering a SubmenuToggle, we need to add some padding here
// but when not rendering a SubmenuToggle, we need to add some padding here
'pr-1'
:
!
hasSubmenuVisible
,
'pr-1'
:
!
hasSubmenuVisible
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment