mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-15 20:01:28 +00:00
fix: update dropdown item text color to use theme text color for consistency; enhance ExampleItem dropdown behavior with fixed positioning (#6543)
This commit is contained in:
@@ -7,7 +7,7 @@ const StyledWrapper = styled.div`
|
||||
}
|
||||
|
||||
div.dropdown-item.menu-item {
|
||||
color: ${(props) => props.theme.colors.danger};
|
||||
color: ${(props) => props.theme.colors.text.danger};
|
||||
&:hover {
|
||||
background-color: ${(props) => props.theme.colors.bg.danger};
|
||||
color: white;
|
||||
|
||||
@@ -19,8 +19,10 @@ import DeleteResponseExampleModal from './DeleteResponseExampleModal';
|
||||
import GenerateCodeItem from '../GenerateCodeItem';
|
||||
import toast from 'react-hot-toast';
|
||||
import StyledWrapper from './StyledWrapper';
|
||||
import { useSidebarAccordion } from 'components/Sidebar/SidebarAccordionContext';
|
||||
|
||||
const ExampleItem = ({ example, item, collection }) => {
|
||||
const { dropdownContainerRef } = useSidebarAccordion();
|
||||
const dispatch = useDispatch();
|
||||
// Check if this example is the active tab
|
||||
const activeTabUid = useSelector((state) => state.tabs?.activeTabUid);
|
||||
@@ -206,6 +208,8 @@ const ExampleItem = ({ example, item, collection }) => {
|
||||
ref={menuDropdownRef}
|
||||
items={buildMenuItems()}
|
||||
placement="bottom-start"
|
||||
appendTo={dropdownContainerRef?.current || document.body}
|
||||
popperOptions={{ strategy: 'fixed' }}
|
||||
data-testid="response-example-menu"
|
||||
>
|
||||
<IconDots size={22} data-testid="response-example-menu-icon" />
|
||||
|
||||
@@ -149,7 +149,7 @@ const Wrapper = styled.div`
|
||||
}
|
||||
|
||||
div.dropdown-item.delete-item {
|
||||
color: ${(props) => props.theme.colors.danger};
|
||||
color: ${(props) => props.theme.colors.text.danger};
|
||||
&:hover {
|
||||
background-color: ${(props) => props.theme.colors.bg.danger} !important;
|
||||
color: white;
|
||||
|
||||
Reference in New Issue
Block a user