mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:11:49 +00:00
[Backport 5.2] code-search: properly display disabled bulk operations (#58476)
code-search: properly display disabled bulk operations (#58461)
* properly display disabled menu items
* prettier
(cherry picked from commit db520b0871)
Co-authored-by: Bolaji Olajide <25608335+BolajiOlajide@users.noreply.github.com>
This commit is contained in:
parent
babe69aff6
commit
cbc410f2c3
@ -12,8 +12,18 @@
|
||||
|
||||
.menu-list-item {
|
||||
padding: 0.5rem 1rem;
|
||||
cursor: pointer;
|
||||
|
||||
&[data-reach-menu-item]:active {
|
||||
&[data-reach-menu-item][aria-disabled='false']:active {
|
||||
--text-muted: var(--white);
|
||||
}
|
||||
|
||||
&[data-reach-menu-item][aria-disabled='true']:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
&[data-reach-menu-item][aria-disabled='true'] {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'
|
||||
|
||||
import { mdiChevronDown } from '@mdi/js'
|
||||
import { VisuallyHidden } from '@reach/visually-hidden'
|
||||
import classNames from 'classnames'
|
||||
|
||||
import {
|
||||
ProductStatusBadge,
|
||||
@ -179,7 +180,11 @@ const DropdownItem: React.FunctionComponent<React.PropsWithChildren<DropdownItem
|
||||
|
||||
return (
|
||||
<MenuItem className={styles.menuListItem} onSelect={onSelect} disabled={action.disabled}>
|
||||
<H4 className="mb-1">
|
||||
<H4
|
||||
className={classNames('mb-1', {
|
||||
'text-muted': action.disabled,
|
||||
})}
|
||||
>
|
||||
{action.dropdownTitle}
|
||||
{action.experimental && (
|
||||
<>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user