mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-24 02:46:27 +00:00
feat: fix style
This commit is contained in:
parent
e1abae91a3
commit
001d9ed9fb
@ -78,6 +78,10 @@
|
||||
max-width: 180px !important;
|
||||
}
|
||||
|
||||
.context-menu.ant-popover {
|
||||
z-index: 10000 !important;
|
||||
}
|
||||
|
||||
// Dark mode support
|
||||
.darkMode {
|
||||
.context-menu-item {
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
import { useCallback, useState } from 'react';
|
||||
|
||||
import { ClickedData, Coordinates, PopoverPosition } from './types';
|
||||
import { Coordinates, PopoverPosition } from './types';
|
||||
|
||||
// Custom hook for managing coordinates
|
||||
export const useCoordinates = (): {
|
||||
coordinates: Coordinates | null;
|
||||
clickedData: ClickedData | null;
|
||||
clickedData: any;
|
||||
popoverPosition: PopoverPosition | null;
|
||||
onClick: (coordinates: { x: number; y: number }, data?: ClickedData) => void;
|
||||
onClick: (coordinates: { x: number; y: number }, data?: any) => void;
|
||||
onClose: () => void;
|
||||
subMenu: string; // todo: create enum
|
||||
setSubMenu: (subMenu: string) => void;
|
||||
} => {
|
||||
const [coordinates, setCoordinates] = useState<Coordinates | null>(null);
|
||||
const [clickedData, setClickedData] = useState<ClickedData | null>(null);
|
||||
const [clickedData, setClickedData] = useState<any>(null);
|
||||
const [subMenu, setSubMenu] = useState<string>('');
|
||||
const [popoverPosition, setPopoverPosition] = useState<PopoverPosition | null>(
|
||||
null,
|
||||
@ -61,7 +61,7 @@ export const useCoordinates = (): {
|
||||
);
|
||||
|
||||
const onClick = useCallback(
|
||||
(coords: { x: number; y: number }, data?: ClickedData): void => {
|
||||
(coords: { x: number; y: number }, data?: any): void => {
|
||||
const coordinates: Coordinates = { x: coords.x, y: coords.y };
|
||||
const position = calculatePosition(coordinates.x, coordinates.y);
|
||||
if (data) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user