refactor(ui): extract dock prompt shell

This commit is contained in:
David Hill
2026-02-17 17:06:21 +00:00
parent b784c923a8
commit 2c17a980ff
4 changed files with 336 additions and 230 deletions

View File

@@ -0,0 +1,21 @@
import type { JSX } from "solid-js"
export function DockPrompt(props: {
kind: "question" | "permission"
header: JSX.Element
children: JSX.Element
footer: JSX.Element
ref?: (el: HTMLDivElement) => void
}) {
const slot = (name: string) => `${props.kind}-${name}`
return (
<div data-component="dock-prompt" data-kind={props.kind} ref={props.ref}>
<div data-slot={slot("body")}>
<div data-slot={slot("header")}>{props.header}</div>
<div data-slot={slot("content")}>{props.children}</div>
</div>
<div data-slot={slot("footer")}>{props.footer}</div>
</div>
)
}