mirror of
https://github.com/vercel/streamdown.git
synced 2026-09-19 02:18:37 +08:00
12 lines
262 B
TypeScript
12 lines
262 B
TypeScript
import { createContext, useContext } from "react";
|
|
|
|
interface CodeBlockContextType {
|
|
code: string;
|
|
}
|
|
|
|
export const CodeBlockContext = createContext<CodeBlockContextType>({
|
|
code: "",
|
|
});
|
|
|
|
export const useCodeBlockContext = () => useContext(CodeBlockContext);
|