UNPKG

@mui/internal-docs-infra

Version:

MUI Infra - internal documentation creation tools.

14 lines (13 loc) 531 B
'use client'; import * as React from 'react'; export var CodeHighlighterContext = /*#__PURE__*/React.createContext(undefined); export function useCodeHighlighterContext() { var context = React.useContext(CodeHighlighterContext); if (context === undefined) { throw new Error('CodeHighlighterContext is missing. `useCodeHighlighterContext` must be used within a `CodeHighlighter` component.'); } return context; } export function useCodeHighlighterContextOptional() { return React.useContext(CodeHighlighterContext); }