Download packages/ui/src/context/file.tsx from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 331 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/ui/src/context/file.tsx
- Command line
-
hf download hf://SaylorTwift/opencode/packages/ui/src/context/file.tsx
-
curl -L -o file.tsx https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/ui/src/context/file.tsx
331 Bytes
| 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 | |