mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-03 15:00:24 +00:00
10 lines
331 B
TypeScript
10 lines
331 B
TypeScript
import type { ValidComponent } from "solid-js"
|
|
import { createSimpleContext } from "./helper"
|
|
|
|
const ctx = createSimpleContext<ValidComponent, { component: ValidComponent }>({
|
|
name: "DiffComponent",
|
|
init: (props) => props.component,
|
|
})
|
|
|
|
export const DiffComponentProvider = ctx.provider
|
|
export const useDiffComponent = ctx.use
|