wip(grafana/ui): put back LayoutItemContext so vite builds

This commit is contained in:
Jack Westbrook
2025-03-03 09:40:34 +01:00
parent ecc1fbdb54
commit b89599a014
2 changed files with 23 additions and 0 deletions
@@ -0,0 +1,21 @@
import { createContext } from 'react';
export interface LayoutItemContextProps {
boostZIndex(): () => void;
}
/**
* Provides an API for downstream components (e.g. within panels) to inform the layout
* that anchored tooltips or context menus could overflow the panel bounds. The layout
* system can then boost the z-index of items with any anchored contents to prevent the overflown
* content from rendering underneath adjacent layout items (e.g. other panels) that naturally
* render later/higher in the stacking order
*
* This is used by VizTooltips and Annotations, which anchor to data points or time range within
* the viz drawing area
*
* @internal
*/
export const LayoutItemContext = createContext<LayoutItemContextProps>({
boostZIndex: () => () => {},
});
@@ -284,6 +284,8 @@ export { Divider } from './Divider/Divider';
export { getDragStyles, type DragHandlePosition } from './DragHandle/DragHandle';
export { useSplitter } from './Splitter/useSplitter';
export { LayoutItemContext, type LayoutItemContextProps } from './Layout/LayoutItemContext';
/** @deprecated Please use non-legacy versions of these components */
const LegacyForms = {
SecretFormField,