blob: 3a2511527316adc56cbfbd58ae82bb865e1add64 (
plain)
1
2
3
4
5
6
7
8
9
10
|
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
|