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

export const DiffComponentProvider = ctx.provider
export const useDiffComponent = ctx.use