react-code-block
Version:
Set of unstyled UI components to build powerful code blocks in React.
7 lines • 684 B
JavaScript
import { createContext } from 'react';
import { createUseContext } from '../shared/utils.js';
export const ShikiRootContext = createContext(undefined);
export const ShikiLineContext = createContext(undefined);
export const useRootContext = createUseContext(ShikiRootContext, 'Could not find nearest <CodeBlock /> component. Please wrap this component with a <CodeBlock /> component imported from "react-code-block/shiki".');
export const useLineContext = createUseContext(ShikiLineContext, 'Could not find nearest <CodeBlock.Code /> component. Please wrap this component with <CodeBlock.Code /> component imported from "react-code-block/shiki".');
//# sourceMappingURL=contexts.js.map