UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

1 lines 946 B
{"version":3,"file":"MenuSub.context.cjs","names":[],"sources":["../../../../src/components/Menu/MenuSub/MenuSub.context.tsx"],"sourcesContent":["import { createContext } from 'react';\nimport type { ReferenceType } from '@floating-ui/react';\n\nexport interface SubMenuContextValue {\n opened: boolean;\n close: () => void;\n open: () => void;\n focusFirstItem: () => void;\n focusParentItem: () => void;\n parentContext: SubMenuContextValue | null;\n setReference: (node: ReferenceType | null) => void;\n setFloating: (node: HTMLElement | null) => void;\n getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;\n getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;\n registerOpenSub: (closeFn: () => void) => () => void;\n}\n\nexport const SubMenuContext = createContext<SubMenuContextValue | null>(null);\n"],"mappings":";;;AAiBA,MAAa,kBAAA,kBAAA,EAAA,eAA2D,IAAI"}