Download packages/session-ui/src/components/dock-prompt.tsx from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 799 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/session-ui/src/components/dock-prompt.tsx
- Command line
-
hf download hf://SaylorTwift/opencode/packages/session-ui/src/components/dock-prompt.tsx
-
curl -L -o dock-prompt.tsx https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/session-ui/src/components/dock-prompt.tsx
799 Bytes
| import type { JSX } from "solid-js" | |
| import { DockShell, DockTray } from "@opencode-ai/ui/dock-surface" | |
| export function DockPrompt(props: { | |
| kind: "question" | "permission" | |
| header: JSX.Element | |
| children: JSX.Element | |
| footer: JSX.Element | |
| ref?: (el: HTMLDivElement) => void | |
| onKeyDown?: JSX.EventHandlerUnion<HTMLDivElement, KeyboardEvent> | |
| }) { | |
| const slot = (name: string) => `${props.kind}-${name}` | |
| return ( | |
| <div data-component="dock-prompt" data-kind={props.kind} ref={props.ref} onKeyDown={props.onKeyDown}> | |
| <DockShell data-slot={slot("body")}> | |
| <div data-slot={slot("header")}>{props.header}</div> | |
| <div data-slot={slot("content")}>{props.children}</div> | |
| </DockShell> | |
| <DockTray data-slot={slot("footer")}>{props.footer}</DockTray> | |
| </div> | |
| ) | |
| } | |