cloudaxe-opencode/packages/ui/src/context/file.tsx

11 lines
331 B
TypeScript
Raw Permalink Normal View History

2025-12-16 16:49:22 +00:00
import type { ValidComponent } from "solid-js"
import { createSimpleContext } from "./helper"
const ctx = createSimpleContext<ValidComponent, { component: ValidComponent }>({
name: "FileComponent",
2025-12-16 16:49:22 +00:00
init: (props) => props.component,
})
export const FileComponentProvider = ctx.provider
export const useFileComponent = ctx.use