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