mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-05 16:02:19 +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: "CodeComponent",
|
|
init: (props) => props.component,
|
|
})
|
|
|
|
export const CodeComponentProvider = ctx.provider
|
|
export const useCodeComponent = ctx.use
|