/**
* Context marker for `
`. Its sole purpose is to tell a
* nested `` that it is a submenu so it can reduce the prop
* surface and opt into submenu-specific behaviors.
*/
import { createContext, useContext } from "solid-js";
import type { MenuRootContextValue } from "../root/menu-root-context";
export interface MenuSubmenuRootContextValue {
parentMenu: MenuRootContextValue;
}
export const MenuSubmenuRootContext =
createContext(null);
export function useMenuSubmenuRootContext(): MenuSubmenuRootContextValue | null {
return useContext(MenuSubmenuRootContext);
}