Download packages/ui/src/components/dock-surface.tsx from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 1.26 kB
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/ui/src/components/dock-surface.tsx
- Command line
-
hf download hf://SaylorTwift/opencode/packages/ui/src/components/dock-surface.tsx
-
curl -L -o dock-surface.tsx https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/ui/src/components/dock-surface.tsx
1.26 kB
| import { type ComponentProps, splitProps } from "solid-js" | |
| export interface DockTrayProps extends ComponentProps<"div"> { | |
| attach?: "none" | "top" | |
| } | |
| export function DockShell(props: ComponentProps<"div">) { | |
| const [split, rest] = splitProps(props, ["children", "class", "classList"]) | |
| return ( | |
| <div | |
| {...rest} | |
| data-dock-surface="shell" | |
| classList={{ | |
| ...split.classList, | |
| [split.class ?? ""]: !!split.class, | |
| }} | |
| > | |
| {split.children} | |
| </div> | |
| ) | |
| } | |
| export function DockShellForm(props: ComponentProps<"form">) { | |
| const [split, rest] = splitProps(props, ["children", "class", "classList"]) | |
| return ( | |
| <form | |
| {...rest} | |
| data-dock-surface="shell" | |
| classList={{ | |
| ...split.classList, | |
| [split.class ?? ""]: !!split.class, | |
| }} | |
| > | |
| {split.children} | |
| </form> | |
| ) | |
| } | |
| export function DockTray(props: DockTrayProps) { | |
| const [split, rest] = splitProps(props, ["attach", "children", "class", "classList"]) | |
| return ( | |
| <div | |
| {...rest} | |
| data-dock-surface="tray" | |
| data-dock-attach={split.attach || "none"} | |
| classList={{ | |
| ...split.classList, | |
| [split.class ?? ""]: !!split.class, | |
| }} | |
| > | |
| {split.children} | |
| </div> | |
| ) | |
| } | |