summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/context/file.tsx
blob: f94368cb180c1f6be1581d5c054dab985e64db15 (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: "FileComponent",
  init: (props) => props.component,
})

export const FileComponentProvider = ctx.provider
export const useFileComponent = ctx.use