"use client" import * as React from "react" /** * Tooltips inside a floating rail sit above `SheetContent` (`z-[80]`) and above * any menu the rail opens. * * A tooltip that renders under the surface it belongs to is invisible, so this * is published as context rather than left to each caller: anything rendered * inside a rail is elevated whether or not the author remembered to ask. */ export const SHEET_TOOLTIP_Z_INDEX = 100 const OverlayElevationContext = React.createContext(null) export const OverlayElevationProvider = OverlayElevationContext.Provider /** Z-index a tooltip needs here, or `null` outside any elevated surface. */ export function useOverlayElevation(): number | null { return React.useContext(OverlayElevationContext) }